Fix bug in clone logic; was ignoring the mutability-strip step in later rule.
This commit is contained in:
parent
0be19e8a95
commit
026cdf9747
|
@ -2586,14 +2586,15 @@ let trans_visitor
|
|||
(ty:Ast.ty)
|
||||
(curr_iso:Ast.ty_iso option)
|
||||
: unit =
|
||||
match strip_mutable_or_constrained_ty ty with
|
||||
let ty = strip_mutable_or_constrained_ty ty in
|
||||
match ty with
|
||||
Ast.TY_chan _ ->
|
||||
trans_upcall "upcall_clone_chan" dst
|
||||
[| (Il.Cell clone_task); (Il.Cell src) |]
|
||||
| Ast.TY_task
|
||||
| Ast.TY_port _
|
||||
| _ when type_has_state ty
|
||||
-> bug () "cloning mutable type"
|
||||
-> bug () "cloning state type"
|
||||
| _ when i64_le (ty_sz abi ty) word_sz
|
||||
-> mov dst (Il.Cell src)
|
||||
| Ast.TY_fn _
|
||||
|
|
Loading…
Reference in New Issue