Skip to content

Commit 6abbae7

Browse files
committed
fix build error with Pexp_field
1 parent 9916513 commit 6abbae7

File tree

2 files changed

+34
-3
lines changed

2 files changed

+34
-3
lines changed

jscomp/build_tests/react_ppx/src/alias_default_value_test.bs.js

Lines changed: 28 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

res_syntax/src/reactjs_jsx_v4.ml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1044,8 +1044,9 @@ let transformStructureItem ~config mapper item =
10441044
Vb.mk
10451045
(Pat.var (Location.mkloc alias loc))
10461046
(Exp.match_
1047-
(Exp.ident
1048-
{txt = Ldot (Lident "props", label); loc = Location.none})
1047+
(Exp.field
1048+
(Exp.ident {txt = Lident "props"; loc = Location.none})
1049+
(Location.mknoloc @@ Lident label))
10491050
[
10501051
Exp.case
10511052
(Pat.construct
@@ -1059,7 +1060,9 @@ let transformStructureItem ~config mapper item =
10591060
| None ->
10601061
Vb.mk
10611062
(Pat.var (Location.mkloc alias loc))
1062-
(Exp.ident @@ Location.mknoloc @@ Ldot (Lident "props", label))
1063+
(Exp.field
1064+
(Exp.ident {txt = Lident "props"; loc = Location.none})
1065+
(Location.mknoloc @@ Lident label))
10631066
in
10641067
let vbMatchList =
10651068
if hasDefaultValue namedArgList then List.map vbMatch namedArgList

0 commit comments

Comments
 (0)