Skip to content

Commit

Permalink
prevent duplicate local name for recursive function
Browse files Browse the repository at this point in the history
  • Loading branch information
ncannasse committed Oct 9, 2024
1 parent 9149396 commit df4d43a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hscript/JsInterp.hx
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ class JsInterp extends Interp {
return exprJS(e);
case EFunction(args, e, name, ret):
var prev = localNames.copy();
if( name != null )
if( name != null && !localNames.exists(name) )
declLocal(name);
for( a in args )
localNames.set(a.name, a.name);
Expand Down

0 comments on commit df4d43a

Please sign in to comment.