You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Strange unreachable error when mixing base class with other classes w/ function override. #1536
a base class type needs to be used when creating the instance. In the example, that's line 38. If we create concrete class type, no exception.
we need 2 separate classes, where one inherit another. Base should have a virtual function defined, and Child should overload that. See line 11 and line 1.
invoke the function from a function in a class created in 1. See line 31.
Running the code should yield unreachable exception while the code above is perfectly legal.
I feel the class/interface implementation of AS isn't complete, and it's hard to debug these issues since it will usually just say "unreachable".
which is missing the B#callImpl overload. In fact, B#callImpl is not part of the binary, indicating that some sort of tree-shaking is going on, missing that it may still be called.
Activity
MaxGraey commentedon Nov 5, 2020
Simplified example a bit:
https://webassembly.studio/?f=usrhhehggba
dcodeIO commentedon Dec 8, 2020
Looking at the generated code, for some reason
A#callImpl's virtual stub reads like thiswhich is missing the
B#callImploverload. In fact,B#callImplis not part of the binary, indicating that some sort of tree-shaking is going on, missing that it may still be called.