DoclerLabs / hexMachina

Releases, issues, documentation, website of hexMachina, framework written in Haxe
http://hexmachina.org
MIT License
44 stars 8 forks source link

Compile fails when aliasing a closure returned by a static method call #248

Closed gene-pavlovsky closed 6 years ago

gene-pavlovsky commented 6 years ago

Flow:

@context()
{
    test = Test.test();
}

Code:

class Test
{
    public static function test():Void->String
        return function () return "test";
}

Results in a compile error: Test.flow:3: characters 8-60 : Void -> String should be String

Workaround: Test: public static function test():{value: Void->String} Flow: testObj = Test.test(); test = testObj.value;