DoclerLabs / hexMachina

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

@Optional inside of a function of ICommandTrigger causes problem #255

Closed aismagulov closed 6 years ago

aismagulov commented 6 years ago
class MyClass implements ICommandTrigger
{
    public function myFunc():Void
    {
        @Inject("myModule")
        @Optional
        var myModule:MyModule;
        myModule.foo();
    }
}

gives an error "Local variable myModule used without being initialized".

aliokan commented 6 years ago

DoclerLabs/hexAnnotation@b34cb161c6a6d463e2620b9256a87767080d83b8 DoclerLabs/hexInject@0bad1bed9131448952850e39a72130df574b0816 DoclerLabs/hexMVC@da13deeb8e2e12ec651e92043743a3fd8562d7e4