This repository was archived by the owner on Jun 15, 2023. It is now read-only.
File tree 3 files changed +34
-4
lines changed
3 files changed +34
-4
lines changed Original file line number Diff line number Diff line change @@ -1043,7 +1043,12 @@ let transformStructureItem ~config mapper item =
1043
1043
in
1044
1044
let innerExpression =
1045
1045
Exp. apply
1046
- (Exp. ident (Location. mknoloc @@ Lident fnName))
1046
+ (Exp. ident
1047
+ (Location. mknoloc
1048
+ @@ Lident
1049
+ (match recFlag with
1050
+ | Recursive -> internalFnName
1051
+ | Nonrecursive -> fnName)))
1047
1052
([(Nolabel , Exp. ident (Location. mknoloc @@ Lident " props" ))]
1048
1053
@
1049
1054
match hasForwardRef with
@@ -1228,7 +1233,8 @@ let transformStructureItem ~config mapper item =
1228
1233
List. fold_right otherStructures structuresAndBinding ([] , [] , [] )
1229
1234
in
1230
1235
types
1231
- @ [{pstr_loc; pstr_desc = Pstr_value (recFlag, bindings)}]
1236
+ (* No need to be Recursive as internal representation is called *)
1237
+ @ [{pstr_loc; pstr_desc = Pstr_value (Nonrecursive , bindings)}]
1232
1238
@
1233
1239
match newBindings with
1234
1240
| [] -> []
Original file line number Diff line number Diff line change @@ -20,16 +20,33 @@ module AnotherName = {
20
20
module Rec = {
21
21
type props = {}
22
22
23
- let rec make = {
23
+ let make = {
24
24
@merlin.focus
25
25
let rec \"make$Internal" = (_: props) => {
26
26
make(({}: props))
27
27
}
28
28
and make = {
29
- let \"V4$Rec" = props => make(props)
29
+ let \"V4$Rec" = props => \" make$Internal" (props)
30
30
31
31
\"V4$Rec"
32
32
}
33
33
make
34
34
}
35
35
}
36
+
37
+ module Rec1 = {
38
+ type props = {}
39
+
40
+ let make = {
41
+ @merlin.focus
42
+ let rec \"make$Internal" = (_: props) => {
43
+ React.null
44
+ }
45
+ and make = {
46
+ let \"V4$Rec1" = props => \"make$Internal"(props)
47
+
48
+ \"V4$Rec1"
49
+ }
50
+ make
51
+ }
52
+ }
Original file line number Diff line number Diff line change @@ -13,4 +13,11 @@ module Rec = {
13
13
let rec make = () => {
14
14
make ({}:props )
15
15
}
16
+ }
17
+
18
+ module Rec1 = {
19
+ @react.component
20
+ let rec make = () => {
21
+ React .null
22
+ }
16
23
}
You can’t perform that action at this time.
0 commit comments