aboutsummaryrefslogtreecommitdiff
path: root/src/boot/me/semant.ml
diff options
context:
space:
mode:
Diffstat (limited to 'src/boot/me/semant.ml')
-rw-r--r--src/boot/me/semant.ml13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/boot/me/semant.ml b/src/boot/me/semant.ml
index 182c6811..21e55193 100644
--- a/src/boot/me/semant.ml
+++ b/src/boot/me/semant.ml
@@ -1065,14 +1065,19 @@ let check_concrete params thing =
else bug () "unhandled parametric binding"
;;
-let rec simplified_ty (t:Ast.ty) : Ast.ty =
+let rec strip_mutable_or_constrained_ty (t:Ast.ty) : Ast.ty =
match t with
- Ast.TY_box t
- | Ast.TY_mutable t
- | Ast.TY_constrained (t, _) -> simplified_ty t
+ Ast.TY_mutable t
+ | Ast.TY_constrained (t, _) -> strip_mutable_or_constrained_ty t
| _ -> t
;;
+let rec simplified_ty (t:Ast.ty) : Ast.ty =
+ match strip_mutable_or_constrained_ty t with
+ Ast.TY_box t -> simplified_ty t
+ | t -> t
+;;
+
let rec project_type
(base_ty:Ast.ty)
(comp:Ast.lval_component)