File tree Expand file tree Collapse file tree 1 file changed +14
-10
lines changed
Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -238,10 +238,12 @@ module Parse = struct
238238 | None -> b.pbop_is_pun
239239 | Some false -> false
240240 | Some true -> (
241- match (b.pbop_pat.ppat_desc, b.pbop_exp.pexp_desc) with
242- | Ppat_var {txt = v ; _} , Pexp_ident {txt = Lident e ; _} ->
243- String. equal v e
244- | _ -> false )
241+ b.pbop_is_pun
242+ ||
243+ match (b.pbop_pat.ppat_desc, b.pbop_exp.pexp_desc) with
244+ | Ppat_var {txt = v ; _} , Pexp_ident {txt = Lident e ; _} ->
245+ String. equal v e
246+ | _ -> false )
245247 in
246248 {b with pbop_loc= {b.pbop_loc with loc_start; loc_end}; pbop_is_pun}
247249 in
@@ -259,12 +261,14 @@ module Parse = struct
259261 | None -> vb.pvb_is_pun
260262 | Some false -> false
261263 | Some true -> (
262- match (vb.pvb_pat.ppat_desc, vb.pvb_body) with
263- | ( Ppat_var {txt= v; _}
264- , Pfunction_body {pexp_desc= Pexp_ident {txt= Lident e; _}; _}
265- ) ->
266- String. equal v e
267- | _ -> false )
264+ vb.pvb_is_pun
265+ ||
266+ match (vb.pvb_pat.ppat_desc, vb.pvb_body) with
267+ | ( Ppat_var {txt= v; _}
268+ , Pfunction_body {pexp_desc= Pexp_ident {txt= Lident e; _}; _}
269+ ) ->
270+ String. equal v e
271+ | _ -> false )
268272 in
269273 (is_extension, {vb with pvb_is_pun})
270274 in
You can’t perform that action at this time.
0 commit comments