[cpp] Mark overridden scriptable methods#12413
Merged
Simn merged 4 commits intoHaxeFoundation:developmentfrom Dec 27, 2025
Merged
[cpp] Mark overridden scriptable methods#12413Simn merged 4 commits intoHaxeFoundation:developmentfrom
Simn merged 4 commits intoHaxeFoundation:developmentfrom
Conversation
e6c4b0e to
6db1046
Compare
Rather than omitting method overrides, we now include them but mark them as overrides to prevent them from being added as separate slots in the vtable. This keeps vtable indices working correctly while keeping super.method calls working as they should.
It is not needed as it is always defined the same way by hxcpp. We can instead just pass the argument directly, or omit it if it is empty. In some cases, HXCPP_CPPIA_SUPER_ARG(0) was being passed to the inIsStatic argument.
They are optional in the api version of hxcpp we require, and have been optional for a very long time.
6db1046 to
83d61b9
Compare
Member
Author
|
With the hxcpp side merged: HaxeFoundation/hxcpp#1273, this is now passing. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#12375 and #12377 reintroduced a bug with super.method calls: HaxeFoundation/hxcpp#1150
This provides an alternative solution to the original issues: #12374 #12376 (and I suppose #5502), by marking methods as overrides so that the cppia runtime can ignore them when constructing the vtable, but still access them for resolving super.method calls (as done in #11773). This requires support from the hxcpp side: HaxeFoundation/hxcpp#1273.
This solves the issue while preserving the fix from #11773. I have added a test here for HaxeFoundation/hxcpp#1150 to avoid further regressions.
See also: #12376 (comment)