making sure try, return etc. control flow doesn't leak through in_dimension.
This commit is contained in:
1 parent
eddc638b88
commit
12309e9e2d
1 file changed
+11
-4
@@ -3205,10 +3205,17 @@ public class CarpetExpression
|
||||
throw new InternalExpressionException("Incorrect dimension string: "+dimString);
|
||||
}
|
||||
}
|
||||
((CarpetContext) c).s = innerSource;
|
||||
Value retval = lv.get(1).evalValue(c);
|
||||
((CarpetContext) c).s = outerSource;
|
||||
return (cc, tt) -> retval;
|
||||
try
|
||||
{
|
||||
((CarpetContext) c).s = innerSource;
|
||||
Value retval = lv.get(1).evalValue(c);
|
||||
return (cc, tt) -> retval;
|
||||
}
|
||||
finally
|
||||
{
|
||||
((CarpetContext) c).s = outerSource;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
this.expr.addLazyFunction("plop", 4, (c, t, lv) ->{
|
||||
|
||||
Reference in new issue
Block a user