Skip to content

Commit fd2ad56

Browse files
committed
---
yaml --- r: 1228 b: refs/heads/master c: 5e92795 h: refs/heads/master v: v3
1 parent 2866531 commit fd2ad56

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 34643eeac83991d8f50d829218291e0592746241
2+
refs/heads/master: 5e9279586b56789ecf6f02535c9624e01daeee96

trunk/src/boot/me/trans.ml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1936,6 +1936,22 @@ let trans_visitor
19361936
and get_drop_glue
19371937
(ty:Ast.ty)
19381938
: fixup =
1939+
1940+
(* obj and fn glue delegates to the body, so is always 'generic'. *)
1941+
let ty =
1942+
match ty with
1943+
Ast.TY_obj _ -> Ast.TY_obj (Ast.LAYER_value, Hashtbl.create 0)
1944+
| Ast.TY_fn _ ->
1945+
Ast.TY_fn ({ Ast.sig_input_slots = [| |];
1946+
Ast.sig_input_constrs = [| |];
1947+
Ast.sig_output_slot =
1948+
{ Ast.slot_mode = Ast.MODE_local;
1949+
Ast.slot_ty = Some Ast.TY_nil }; },
1950+
{ Ast.fn_is_iter = false;
1951+
Ast.fn_effect = Ast.EFF_pure })
1952+
| _ -> ty
1953+
in
1954+
19391955
let g = GLUE_drop ty in
19401956
let inner _ (args:Il.cell) =
19411957
let ty_params = deref (get_element_ptr args 0) in

0 commit comments

Comments
 (0)