In polymod if we add a local function like:
override public function onCreate(event:ScriptEvent) {
var value = 1;
function myLocalFunction(i) {
return value + i;
}
trace(myLocalFunction(2));
}
We could call it in a separate function in the class like so and it would work:
override public function onStateCreate(event:ScriptEvent):Void {
trace(myLocalFunction(2));
}
And for some reason it would work.
Not sure if this should be allowed, but it seems like a bug to me since haxe doesn't allow this.