Skip to content

Commit

Permalink
resolve should not override locals
Browse files Browse the repository at this point in the history
  • Loading branch information
ncannasse committed Oct 6, 2024
1 parent f103e3c commit 505442e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions hscript/Interp.hx
Original file line number Diff line number Diff line change
Expand Up @@ -282,9 +282,6 @@ class Interp {
}

function resolve( id : String ) : Dynamic {
var l = locals.get(id);
if( l != null )
return l.r;
var v = variables.get(id);
if( v == null && !variables.exists(id) )
error(EUnknownVariable(id));
Expand All @@ -304,6 +301,9 @@ class Interp {
case CString(s): return s;
}
case EIdent(id):
var l = locals.get(id);
if( l != null )
return l.r;
return resolve(id);
case EVar(n,_,e):
declared.push({ n : n, old : locals.get(n) });
Expand Down

0 comments on commit 505442e

Please sign in to comment.