diff --git a/rhino/src/main/java/org/mozilla/javascript/ast/Scope.java b/rhino/src/main/java/org/mozilla/javascript/ast/Scope.java index 336a6ef656..b0d28b2bb3 100644 --- a/rhino/src/main/java/org/mozilla/javascript/ast/Scope.java +++ b/rhino/src/main/java/org/mozilla/javascript/ast/Scope.java @@ -115,7 +115,7 @@ public void setTop(ScriptNode top) { * a scope chain. */ public static Scope splitScope(Scope scope) { - Scope result = new Scope(scope.getType()); + Scope result = new Scope(scope.getPosition(), scope.getLength()); result.symbolTable = scope.symbolTable; scope.symbolTable = null; result.parent = scope.parent;