From a1e24c2a13713b015abc9a93e6915b6d4a6f22fe Mon Sep 17 00:00:00 2001 From: Son Ho Date: Wed, 2 Aug 2023 14:10:15 +0200 Subject: Make progress --- compiler/Substitute.ml | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'compiler/Substitute.ml') 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")) -- cgit v1.2.3