File tree Expand file tree Collapse file tree 3 files changed +31
-0
lines changed Expand file tree Collapse file tree 3 files changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -1799,6 +1799,9 @@ and walkCoreType typ t comments =
17991799 attach t.trailing typexpr.ptyp_loc afterTyp
18001800 | Ptyp_variant (rowFields , _ , _ ) ->
18011801 walkList (rowFields |> List. map (fun rf -> RowField rf)) t comments
1802+ | Ptyp_constr
1803+ ({txt = Lident " function$" }, [({ptyp_desc = Ptyp_arrow _} as desc); _]) ->
1804+ walkCoreType desc t comments
18021805 | Ptyp_constr (longident , typexprs ) ->
18031806 let beforeLongident, _afterLongident =
18041807 partitionLeadingTrailing comments longident.loc
Original file line number Diff line number Diff line change @@ -79,3 +79,17 @@ type jsUser = /* before */ {
7979 // above age
8080 /* before age */ "age" /* after age */: /* before int */ int /* after int */,
8181} /* after */
82+
83+ external test: (
84+ // comment 1
85+ ~int: int,
86+ // comment 2
87+ ~int: int,
88+ ) => unit = "test"
89+
90+ external another_test: (
91+ // comment 1
92+ int,
93+ // comment 2
94+ int,
95+ ) => unit = "test"
Original file line number Diff line number Diff line change @@ -64,3 +64,17 @@ type jsUser = /* before */ {
6464 // above age
6565 /* before age */ "age" /* after age */ : /*before int */ int /*after int */
6666} /* after */
67+
68+ external test : (
69+ // comment 1
70+ ~int : int ,
71+ // comment 2
72+ ~int : int ,
73+ ) => unit = "test"
74+
75+ external another_test : (
76+ // comment 1
77+ int ,
78+ // comment 2
79+ int ,
80+ ) => unit = "test"
You can’t perform that action at this time.
0 commit comments