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:
parent
776120de05
commit
705c1b9d53
1 changed files with 6 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue