fix(tvix/eval): skip runtime completely on compiler errors
This branch was missing, and an assumption elsewhere just executed the returned (broken) bytecode. This fixes b/253. Change-Id: I015023ba921bc08ea03882167f1f560feca25e50 Reviewed-on: https://cl.tvl.fyi/c/depot/+/8090 Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de> Autosubmit: tazjin <tazjin@tvl.su>
This commit is contained in:
parent
91a366af46
commit
c98c5399b9
2 changed files with 18 additions and 0 deletions
|
|
@ -22,3 +22,15 @@ fn test_source_builtin() {
|
|||
value,
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn skip_broken_bytecode() {
|
||||
let result = Evaluation::new(/* code = */ "x", None).evaluate();
|
||||
|
||||
assert_eq!(result.errors.len(), 1);
|
||||
|
||||
assert!(matches!(
|
||||
result.errors[0].kind,
|
||||
ErrorKind::UnknownStaticVariable
|
||||
));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue