summaryrefslogtreecommitdiff
path: root/compiler/Invariants.ml
diff options
context:
space:
mode:
authorSon Ho2023-08-02 18:28:08 +0200
committerSon Ho2023-08-02 18:28:08 +0200
commit10822d76c7b45b9566f8e2b458107ac8b0eac60e (patch)
tree86c06d827b188171939c9e423bea5b4f892e3828 /compiler/Invariants.ml
parentf6b4aade7b4a60ed589440af042b44c65c9fcb92 (diff)
Make minor modifications
Diffstat (limited to '')
-rw-r--r--compiler/Invariants.ml3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/Invariants.ml b/compiler/Invariants.ml
index a726eda0..e73c09c4 100644
--- a/compiler/Invariants.ml
+++ b/compiler/Invariants.ml
@@ -456,6 +456,9 @@ let check_typing_invariant (ctx : C.eval_ctx) : unit =
List.iter
(fun (v : V.typed_value) -> assert (v.ty = vec_ty))
fvs
+ | T.Range, [ v0; v1 ], [], [ inner_ty ], [] ->
+ assert (v0.V.ty = inner_ty);
+ assert (v1.V.ty = inner_ty)
| (T.Array | T.Slice | T.Str), _, _, _, _ ->
raise (Failure "Unexpected")
| _ -> raise (Failure "Erroneous type"))