Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't call the fact method of subclass, when the method return the the super class type. #243

Closed
LiaoPeng opened this issue Sep 5, 2018 · 2 comments

Comments

@LiaoPeng
Copy link
Contributor

LiaoPeng commented Sep 5, 2018

The code https://webassembly.studio/?f=u0j2rkrcq49

Expected output:
1
2
In fact, the output:
1
1

@LiaoPeng LiaoPeng changed the title can't call the fact subclass Can't call the fact method of subclass, when the method return the the super class type. Sep 5, 2018
@dcodeIO
Copy link
Member

dcodeIO commented Sep 6, 2018

Also somewhat related to GC, in that there are no virtual methods / no virtual lookup table yet. In your fiddle

(<A>something).getAge(); // calls A#getAge
(<B>something).getAge(); // calls B#getAge

@MaxGraey
Copy link
Member

MaxGraey commented Mar 9, 2020

Superseded by #693

@MaxGraey MaxGraey closed this as completed Mar 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants