fix(tvix/eval): correct runtime error for missing dynamic upvalue

Change-Id: I75c351619780fdc5186a54f3df9b244ada984069
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6324
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
This commit is contained in:
Vincent Ambo 2022-08-28 17:01:38 +03:00 committed by tazjin
parent 776120de05
commit 705c1b9d53

View file

@ -381,6 +381,12 @@ impl VM {
OpCode::OpGetUpvalue(upv_idx) => {
let value = self.frame().closure.upvalue(upv_idx).clone();
if let Value::DynamicUpvalueMissing(name) = value {
return Err(
ErrorKind::UnknownDynamicVariable(name.as_str().to_string()).into()
);
}
self.push(value);
}