Even if add/omit "override" keyword, can't fix compile error in native class.
shibukawa opened this issue · 2 comments
shibukawa commented
I created all combinations of method "static" modifier.
The last case (parent has static, child doesn't have static), always compiler blames me.
// Level 1
native class Parent
{
function getName() : string;
}
native class StaticParent
{
static function getName() : string;
}
// Level 2
native class InstanceStaticChild extends Parent
{
static function getName() : string;
}
native class InstanceInstanceChild extends Parent
{
override function getName() : string;
}
native class StaticStaticChild extends StaticParent
{
static function getName() : string;
}
native class StaticInstanceChild extends StaticParent
{
function getName() : string; // Error
// if omit "override" => overriding functions must have 'override' attribute set
// if add "override" => could not find function definition in base classes / mixins to be overridden
}
shibukawa commented
Thanks!
shibukawa commented
I confirmed it works very well.