Skip to content

Commit 91d23dc

Browse files
committed
Remove moved attributes from expr
1 parent 65c2bf2 commit 91d23dc

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

compiler/syntax/src/jsx_v4.ml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1283,6 +1283,12 @@ let map_binding ~config ~empty_loc ~pstr_loc ~file_name ~rec_flag binding =
12831283
{
12841284
binding with
12851285
pvb_attributes = binding.pvb_attributes |> List.filter other_attrs_pure;
1286+
pvb_expr =
1287+
{
1288+
binding.pvb_expr with
1289+
(* moved to wrapper_expr *)
1290+
pexp_attributes = [];
1291+
};
12861292
},
12871293
new_binding )
12881294
else (None, binding, None)

tests/tests/src/alias_default_value_test.mjs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,11 @@ let C7 = {
8282
make: Alias_default_value_test$C7
8383
};
8484

85-
function make(props) {
85+
function Alias_default_value_test$C8(props) {
8686
'use memo';
8787
return props.count;
8888
}
8989

90-
let Alias_default_value_test$C8 = make;
91-
9290
let C8 = {
9391
make: Alias_default_value_test$C8
9492
};

0 commit comments

Comments
 (0)