making sure try, return etc. control flow doesn't leak through in_dimension.

This commit is contained in:
gnembon committed 2020-06-22 16:21:55 -03:00
1 parent eddc638b88
commit 12309e9e2d
1 file changed
+8 -1
@@ -3205,10 +3205,17 @@ public class CarpetExpression
throw new InternalExpressionException("Incorrect dimension string: "+dimString);
}
}
try
{
((CarpetContext) c).s = innerSource;
Value retval = lv.get(1).evalValue(c);
((CarpetContext) c).s = outerSource;
return (cc, tt) -> retval;
}
finally
{
((CarpetContext) c).s = outerSource;
}
});
this.expr.addLazyFunction("plop", 4, (c, t, lv) ->{