diff --git a/src/main/java/me/topchetoeu/jscript/compilation/scope/FunctionScope.java b/src/main/java/me/topchetoeu/jscript/compilation/scope/FunctionScope.java index 85bb3eb..757c4d8 100644 --- a/src/main/java/me/topchetoeu/jscript/compilation/scope/FunctionScope.java +++ b/src/main/java/me/topchetoeu/jscript/compilation/scope/FunctionScope.java @@ -40,14 +40,13 @@ public class FunctionScope extends Scope { @Override public Variable defineStrict(Variable var, Location loc) { checkNotEnded(); if (locals.has(var.name)) throw alreadyDefinedErr(loc, var.name); - if (specials.has(var.name)) throw alreadyDefinedErr(loc, var.name); if (blacklistNames.contains(var.name)) throw alreadyDefinedErr(loc, var.name); var res = super.defineStrict(var, loc); removeCapture(var.name); return res; } - public Variable defineParam(Variable var, Location loc) { + public Variable defineSpecial(Variable var, Location loc) { return specials.add(var); }