Override protected native as3 getter or protected method from swc


(Uldis Baurovskis) #1

have some issue with overriding native as3 getters.
Already had a discussion on the openfl forum but could not find a solution, maybe here someone has some ideas.

I am using feather ui libs swc, that defines:

protected function get defaultStyleProvider():IStyleProvider
	return null;

Extended that class from swc and trying to override that getter

@:getter(defaultStyleProvider) @:protected override function getDefaultStyleProvider(): IStyleProvider {
	return CustomController.globalStyleProvider;

but getting error:

Field getDefaultStyleProvider is declared 'override' but doesn't override any field

without override code compiles but at runtime getting error:

Error #1053: Illegal override of defaultStyleProvider

Tried to define extern to force haxe compiler to add override but failed till now.

(Uldis Baurovskis) #2

Got help from openfl team, and looks like haxe bug, but issue is closed so overriding protect methods / getters / setters will stay broken for flash target