X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fibex%2Fjs%2FInterpreter.java;h=5fac7cbcb68a8ceebf68b77544589acdafb70ab5;hb=9886bf61ea5fbbc8eec3969ca21d72a4dce69afe;hp=0d2c21905ef06b8b2bf7615d6ff9f75386f0ff98;hpb=29d34750ad40b2addfbc5f20cdab3d4accac157e;p=org.ibex.core.git diff --git a/src/org/ibex/js/Interpreter.java b/src/org/ibex/js/Interpreter.java index 0d2c219..5fac7cb 100644 --- a/src/org/ibex/js/Interpreter.java +++ b/src/org/ibex/js/Interpreter.java @@ -217,8 +217,8 @@ class Interpreter implements ByteCodes, Tokens { throw je("tried to assign \"" + (val==null?"(null)":val.toString()) + "\" to the null key"); Trap t = null; - if (target instanceof JSScope && key.equals("cascade")) { - Trap.TrapScope ts = null; + Trap.TrapScope ts = null; + if (target instanceof JSScope && key.equals("cascade")) { JSScope p = (JSScope)target; // search the scope-path for the trap if (target instanceof Trap.TrapScope) { ts = (Trap.TrapScope)target; @@ -235,7 +235,7 @@ class Interpreter implements ByteCodes, Tokens { if (t == null) { target = ts.t.trapee; key = ts.t.name; } } } - if(t == null) { + if(ts == null) { if (target instanceof JSScope) { JSScope p = (JSScope)target; // search the scope-path for the trap t = p.getTrap(key);