@@ -4566,7 +4566,10 @@ and print_jsx_props ~state args cmt_tbl : Doc.t * Parsetree.expression option =
45664566and print_jsx_prop ~state arg cmt_tbl =
45674567 match arg with
45684568 | ( ((Asttypes. Lbl {txt = lbl_txt} | Opt {txt = lbl_txt}) as lbl),
4569- {pexp_desc = Pexp_ident {txt = Longident. Lident ident}} )
4569+ {
4570+ pexp_attributes = [] ;
4571+ pexp_desc = Pexp_ident {txt = Longident. Lident ident};
4572+ } )
45704573 when lbl_txt = ident (* jsx punning *) -> (
45714574 match lbl with
45724575 | Nolbl -> Doc. nil
@@ -4891,7 +4894,10 @@ and print_argument ~state (arg_lbl, arg) cmt_tbl =
48914894 match (arg_lbl, arg) with
48924895 (* ~a (punned)*)
48934896 | ( Lbl {txt = lbl; loc = l0},
4894- {pexp_desc = Pexp_ident {txt = Longident. Lident name}} )
4897+ {
4898+ pexp_attributes = [] ;
4899+ pexp_desc = Pexp_ident {txt = Longident. Lident name};
4900+ } )
48954901 when lbl = name && not (ParsetreeViewer. is_braced_expr arg) ->
48964902 let loc = {l0 with loc_end = arg.pexp_loc.loc_end} in
48974903 let doc = Doc. concat [Doc. tilde; print_ident_like lbl] in
@@ -4903,6 +4909,7 @@ and print_argument ~state (arg_lbl, arg) cmt_tbl =
49034909 Pexp_constraint
49044910 ( ({pexp_desc = Pexp_ident {txt = Longident. Lident name}} as arg_expr),
49054911 typ );
4912+ pexp_attributes = [] ;
49064913 } )
49074914 when lbl = name && not (ParsetreeViewer. is_braced_expr arg_expr) ->
49084915 let loc = {l0 with loc_end = arg.pexp_loc.loc_end} in
@@ -4917,7 +4924,11 @@ and print_argument ~state (arg_lbl, arg) cmt_tbl =
49174924 in
49184925 print_comments doc cmt_tbl loc
49194926 (* ~a? (optional lbl punned)*)
4920- | Opt {txt = lbl; loc}, {pexp_desc = Pexp_ident {txt = Longident. Lident name}}
4927+ | ( Opt {txt = lbl; loc},
4928+ {
4929+ pexp_desc = Pexp_ident {txt = Longident. Lident name};
4930+ pexp_attributes = [] ;
4931+ } )
49214932 when lbl = name ->
49224933 let doc = Doc. concat [Doc. tilde; print_ident_like lbl; Doc. question] in
49234934 print_comments doc cmt_tbl loc
0 commit comments