Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions polymod/hscript/_internal/PolymodInterpEx.hx
Original file line number Diff line number Diff line change
Expand Up @@ -1492,11 +1492,6 @@ override function resolve(id:String):Dynamic
return null;
}

if (locals.exists(id))
{
// NOTE: id may exist but be null
return locals.get(id).r;
}
if (variables.exists(id))
{
// NOTE: id may exist but be null
Expand Down Expand Up @@ -1685,10 +1680,11 @@ public function callScriptClassStaticFunction(clsName:String, fnName:String, arg

this._classDeclOverride = cls;

var localsCopy:Map<String, {r:Dynamic, ?isfinal:Null<Bool>}> = this.locals.copy();
var result:Dynamic = null;
try
{
result = this.exprReturn(fn.expr);
result = this.executeEx(fn.expr);
}
catch (err:PolymodExprEx.ErrorEx)
{
Expand Down Expand Up @@ -1720,6 +1716,7 @@ public function callScriptClassStaticFunction(clsName:String, fnName:String, arg
}
}
this._classDeclOverride = previousClassDecl;
this.locals = localsCopy;

return result;
}
Expand Down