fix: wrong check for var decl collisions
This commit is contained in:
parent
55caf1e206
commit
b6a90b108b
@ -27,7 +27,7 @@ public class FunctionScope extends Scope {
|
||||
|
||||
@Override public Variable define(Variable var, Location loc) {
|
||||
checkNotEnded();
|
||||
if (locals.has(var.name)) throw alreadyDefinedErr(loc, var.name);
|
||||
if (variables.has(var.name)) throw alreadyDefinedErr(loc, var.name);
|
||||
|
||||
if (passtrough) {
|
||||
blacklistNames.add(var.name);
|
||||
|
Loading…
Reference in New Issue
Block a user