Strip off TY_mutables and TY_constraineds when unboxing values during autoderef
This commit is contained in:
parent
ae515c017c
commit
b0f77088fa
@ -55,6 +55,7 @@ let check_stmt (cx:Semant.ctxt) : (fn_ctx -> Ast.stmt -> unit) =
|
||||
let rec unbox ty acc =
|
||||
match ty with
|
||||
Ast.TY_box ty' -> unbox ty' (acc + 1)
|
||||
| Ast.TY_mutable ty' | Ast.TY_constrained (ty', _) -> unbox ty' acc
|
||||
| _ -> (ty, acc)
|
||||
in
|
||||
unbox ty 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user