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

[hl] Fix interface override function resolution #11723

Merged

Conversation

yuxiaomao
Copy link
Contributor

@yuxiaomao yuxiaomao commented Jul 17, 2024

Fixes HaxeFoundation/hashlink#685

Happens when an interface extends another, and they have a same field (same name, but might have different type, in this case, return type extends parent's return type). Before the fix, tests will fail with -D hl-check then calls a different function / access violation when calling fromBareUser.getStringValue().

I'm not sure if List.sort_uniq will always keep the first occurrence in the list, but this implementation rely on that. If that's not guaranteed I can implement my own version.
Implemented an uniq which keep child's fields before parent's. List.sort is not necessary here but it's used in vfields at other location.

@yuxiaomao yuxiaomao merged commit 3b8f2e0 into HaxeFoundation:development Jul 19, 2024
51 checks passed
@yuxiaomao yuxiaomao deleted the dev-hl-virtualsamename branch July 19, 2024 07:32
@skial skial mentioned this pull request Jul 23, 2024
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JIT/VM calls incorrect method
1 participant