Skip to content

Commit b0f7708

Browse files
committed
Strip off TY_mutables and TY_constraineds when unboxing values during autoderef
1 parent ae515c0 commit b0f7708

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/boot/me/type.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ let check_stmt (cx:Semant.ctxt) : (fn_ctx -> Ast.stmt -> unit) =
5555
let rec unbox ty acc =
5656
match ty with
5757
Ast.TY_box ty' -> unbox ty' (acc + 1)
58+
| Ast.TY_mutable ty' | Ast.TY_constrained (ty', _) -> unbox ty' acc
5859
| _ -> (ty, acc)
5960
in
6061
unbox ty 0

0 commit comments

Comments
 (0)