assemblyscript
assemblyscript copied to clipboard
Operator overload
new A() == new B() and new B() == new A() will call different operator overload functions if both A and B have overload function declarations.
It needs more clear rules to handle it. In my opinion there are two solutions:
- Diagnose when confused overload resolution.
- Define priorities and do overload resolution according to priorities.
Number one seems more plausible, since a cast would fix it.