jsx / JSX

JSX - a faster, safer, easier JavaScript

Home Page:http://jsx.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Even if add/omit "override" keyword, can't fix compile error in native class.

shibukawa opened this issue · comments

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
}

I confirmed it works very well.