Skip to content

Commit c73153c

Browse files
committed
restore interpreter semantics
1 parent 7803f45 commit c73153c

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/mlang/backend_ir/bir_interpreter.ml

+4-5
Original file line numberDiff line numberDiff line change
@@ -479,11 +479,10 @@ module Make (N : Bir_number.NumberInterface) = struct
479479
| TableVar _ -> assert false
480480
(* should not happen *)
481481
with Not_found ->
482-
(* Cli.warning_print
483-
* "Var %s used before definition, assumed undefined.\n%s"
484-
* (Pos.unmark var.Variable.name)
485-
* (Pos.retrieve_loc_text (Pos.get_position e)); *)
486-
Undefined
482+
Errors.raise_spanned_error
483+
("Var not found (should not happen): "
484+
^ Pos.unmark (Bir.var_to_mir var).Mir.Variable.name)
485+
(Pos.get_position e)
487486
in
488487
r
489488
| GenericTableIndex -> (

0 commit comments

Comments
 (0)