interpret icon indicating copy to clipboard operation
interpret copied to clipboard

call static function within self class errror.

Open sonygod opened this issue 4 years ago • 1 comments

add a static function in WatchedClass.hx after build hxml

@interpret  public static function hello():Void{
                trace("static function11");
    }

when call

WatchedClass.hello();//error.

 @interpret  public static function hello():Void{
                trace("static function11");
    }

    /** This is an interpretable method. It is compiled as native haxe code with the app,
        but if the method is updated while the app is running, its new content will be live-reloaded
        and the code will be executed with `interpret`. */
    @interpret public function printSomething() {

        // Just testing calling a native (non-interpreted) method
        // and get its return value
        var className = getClassNameFromNative();

        // Then printing something (note that string interpolation works :))
        trace('$className');
        hello();//work.
         WatchedClass.hello();//error.
       trace(NativeClass.randomName());//error
       

    } //printSomething

sonygod avatar Jan 08 '21 02:01 sonygod

Hi, thanks for the issue report!

Unfortunately my current focus is on other projects at the moment so I won’t fix that anytime soon, but I will review Pull Request if anybody want to fix that himself

jeremyfa avatar Jan 09 '21 11:01 jeremyfa