diff options
Diffstat (limited to 'tvix/eval/src/lib.rs')
-rw-r--r-- | tvix/eval/src/lib.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tvix/eval/src/lib.rs b/tvix/eval/src/lib.rs index f903a078ff3b..44fe8af2ccc5 100644 --- a/tvix/eval/src/lib.rs +++ b/tvix/eval/src/lib.rs @@ -317,6 +317,12 @@ fn parse_compile_internal( result.warnings = compiler_result.warnings; result.errors.extend(compiler_result.errors); + // Short-circuit if errors exist at this point (do not pass broken + // bytecode to the runtime). + if !result.errors.is_empty() { + return None; + } + // Return the lambda (for execution) and the globals map (to // ensure the invariant that the globals outlive the runtime). Some((compiler_result.lambda, compiler_result.globals)) |