haxe
haxe copied to clipboard
[cpp] Implemented abstract methods are not called
Haxe version: 4.3.6
new Test().t(); // <----- false
class Test extends AbstractTest {
private function test(flag:Bool = false):Bool return true;
}
abstract class AbstractTest {
public function new() {}
public function t(): Void {
trace(test()); // <----- false
}
abstract private function test(flag:Bool = false):Bool;
}
This works correctly if you don't use optional arguments. Or call the implemented method inside the Test class.
Hello, this is due to default arguments: #11666. It is fixed in the haxe 5 preview, hopefully it will also be added if there is a haxe 4.3.8 release.