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 @@ -1489,11 +1489,6 @@ class PolymodInterpEx extends Interp
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 @@ -1681,10 +1676,11 @@ class PolymodInterpEx extends Interp

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 @@ -1716,6 +1712,7 @@ class PolymodInterpEx extends Interp
}
}
this._classDeclOverride = previousClassDecl;
this.locals = localsCopy;

return result;
}
Expand Down