hxcpp icon indicating copy to clipboard operation
hxcpp copied to clipboard

[cppia] Fix haxe overridden scriptable methods

Open tobil4sk opened this issue 1 month ago • 0 comments

This enables an alternate solution for these bugs: https://github.com/HaxeFoundation/haxe/issues/12374 https://github.com/HaxeFoundation/haxe/issues/12376

With this PR, haxe is able to mark methods as overrides so that they don't add an additional slot to the vtable. This way, haxe can still include them in __scriptableFunctions so that they can be resolved correctly in super.method calls, avoiding #1150.

Alternatively, if the haxe version is old and does not mark them, then fallback logic is used to infer overrides from matching method names. This has a runtime cost but avoids incorrect behaviour for current haxe. This only really affects 4.3.7 as older versions suffered from #1150.

tobil4sk avatar Nov 28 '25 03:11 tobil4sk