From 19fbdcc01f30063e4498031dd39ef2e9047d3b8f Mon Sep 17 00:00:00 2001 From: Roland Praml Date: Thu, 26 Sep 2024 08:40:34 +0200 Subject: [PATCH] Pass correct parameters in splitScope --- rhino/src/main/java/org/mozilla/javascript/ast/Scope.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;