Skip to content

Commit a2d201e

Browse files
committed
%op: Don't pun at local let bindings, keep collecting
1 parent d44dd16 commit a2d201e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/ppx_op.ml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,8 +327,7 @@ let rec translate ~num_configs ~is_toplevel ~has_config ?label expr =
327327
(vbs, { binding with pvb_expr }))
328328
in
329329
let vbs2, body = loop ?label body in
330-
let all_bindings = (Map.data @@ reduce_vbss vbss1) @ bindings @ Map.data vbs2 in
331-
(no_vbs, { expr with pexp_desc = Pexp_let (recflag, all_bindings, body) })
330+
(reduce_vbss (vbss1 @ [ vbs2 ]), { expr with pexp_desc = Pexp_let (recflag, bindings, body) })
332331
| { pexp_desc = Pexp_open (decl, body); _ } ->
333332
let vbs, body = loop ?label body in
334333
(vbs, { expr with pexp_desc = Pexp_open (decl, body) })

0 commit comments

Comments
 (0)