Skip to content

Commit 284cb45

Browse files
committed
remove assert false catch-all and provide every case
1 parent c529d3d commit 284cb45

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

src/mlang/m_ir/mir_interpreter.ml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,22 @@ struct
845845
| FuncCall (Pos.Mark (Func fn, _), args) ->
846846
let fd = StrMap.find fn ctx.ctx_prog.program_functions in
847847
evaluate_function ctx fd args
848-
| FuncCall (_, _) -> assert false
848+
| FuncCall (Pos.Mark (AbsFunc, _), _)
849+
| FuncCall (Pos.Mark (Supzero, _), _)
850+
| FuncCall (Pos.Mark (PresentFunc, _), _)
851+
| FuncCall (Pos.Mark (ArrFunc, _), _)
852+
| FuncCall (Pos.Mark (MinFunc, _), _)
853+
| FuncCall (Pos.Mark (MaxFunc, _), _)
854+
| FuncCall (Pos.Mark (Multimax, _), _)
855+
| FuncCall (Pos.Mark (InfFunc, _), _) ->
856+
raise @@ Failure "arity error"
857+
| FuncCall
858+
( Mark
859+
( ( SumFunc | GtzFunc | GtezFunc | NullFunc | VerifNumber
860+
| ComplNumber ),
861+
_ ),
862+
_ ) ->
863+
raise @@ Failure "not implemented"
849864
| Attribut (m_acc, a) -> (
850865
match get_access_var ctx (Pos.unmark m_acc) with
851866
| Some (vsd, v) -> (

0 commit comments

Comments
 (0)