don't clone interp locals. Fix #6

This commit is contained in:
2024-02-15 17:16:57 -07:00
parent c38a93eee1
commit ff7ed5eb51

View File

@@ -559,10 +559,7 @@ class Helpers {
for (name => value in k.macroVars) {
interp.variables.set(name, value);
}
var locals = interp.getLocals();
interp.setLocals(new Cloner().clone(locals));
var value = interp.publicExprReturn(compileTimeHScript(innerExp, k));
interp.setLocals(locals);
if (value == null) {
throw KissError.fromExp(exp, "compile-time evaluation returned null");
}