summaryrefslogtreecommitdiff
path: root/compiler/Substitute.ml
diff options
context:
space:
mode:
authorSon Ho2023-08-02 14:10:15 +0200
committerSon Ho2023-08-02 14:10:15 +0200
commita1e24c2a13713b015abc9a93e6915b6d4a6f22fe (patch)
tree7cbbe7f86da8f646d8bcac7ea506d70655a25bb9 /compiler/Substitute.ml
parent59ec03d37d2ad51cf77e456622703c4c84780f48 (diff)
Make progress
Diffstat (limited to 'compiler/Substitute.ml')
-rw-r--r--compiler/Substitute.ml5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/Substitute.ml b/compiler/Substitute.ml
index a1b1572e..38850243 100644
--- a/compiler/Substitute.ml
+++ b/compiler/Substitute.ml
@@ -230,6 +230,11 @@ let ctx_adt_value_get_instantiated_field_rtypes (ctx : C.eval_ctx)
if adt.V.variant_id = Some T.option_some_id then type_params
else if adt.V.variant_id = Some T.option_none_id then []
else raise (Failure "Unreachable")
+ | T.Range ->
+ assert (List.length region_params = 0);
+ assert (List.length type_params = 1);
+ assert (List.length cg_params = 0);
+ type_params
| T.Array | T.Slice | T.Str ->
(* Those types don't have fields *)
raise (Failure "Unreachable"))