File tree Expand file tree Collapse file tree 4 files changed +43
-8
lines changed
tests/analysis_tests/tests/src Expand file tree Collapse file tree 4 files changed +43
-8
lines changed Original file line number Diff line number Diff line change 2020
2121#### :bug : Bug fix
2222
23+ - Fix generation of interfaces for module types containing multiple type constraints. https://github.com/rescript-lang/rescript/pull/7825
24+
2325#### :memo : Documentation
2426
2527#### :nail_care : Polish
Original file line number Diff line number Diff line change @@ -217,14 +217,18 @@ let rec print_out_type_doc (out_type : Outcometree.out_type) =
217217 Doc. join ~sep: Doc. line
218218 ((List. map2 [@ doesNotRaise])
219219 (fun lbl typ ->
220- Doc. concat
221- [
222- Doc. text
223- (if i.contents > 0 then " and type " else " with type " );
224- Doc. text lbl;
225- Doc. text " = " ;
226- print_out_type_doc typ;
227- ])
220+ let result =
221+ Doc. concat
222+ [
223+ Doc. text
224+ (if i.contents > 0 then " and type " else " with type " );
225+ Doc. text lbl;
226+ Doc. text " = " ;
227+ print_out_type_doc typ;
228+ ]
229+ in
230+ incr i;
231+ result)
228232 labels types)
229233 in
230234 Doc. indent (Doc. concat [Doc. line; package])
Original file line number Diff line number Diff line change @@ -171,3 +171,24 @@ module ComponentWithPolyProp = {
171171 <div className />
172172 }
173173}
174+
175+ module OrderedSet = {
176+ type t <'a , 'identity > = {
177+ cmp : ('a , 'a ) => int ,
178+ set : Belt .Set .t <'a , 'identity >,
179+ array : array <'a >,
180+ }
181+
182+ let make = (
183+ type value identity ,
184+ ~id : module (Belt .Id .Comparable with type t = value and type identity = identity ),
185+ ): t <value , identity > => {
186+ let module (M ) = id
187+
188+ {
189+ cmp : M .cmp -> Belt .Id .getCmpInternal ,
190+ set : Belt .Set .make (~id ),
191+ array : [],
192+ }
193+ }
194+ }
Original file line number Diff line number Diff line change @@ -124,4 +124,12 @@ module ComponentWithPolyProp: {
124124 @react.component
125125 let make: (~size: [< #large | #small]=?) => Jsx.element
126126}
127+ module OrderedSet: {
128+ type t<'a, 'identity> = {
129+ cmp: ('a, 'a) => int,
130+ set: Belt.Set.t<'a, 'identity>,
131+ array: array<'a>,
132+ }
133+ let make: (~id: module(Belt.Id.Comparable with type identity = 'a and type t = 'b)) => t<'b, 'a>
134+ }
127135
You can’t perform that action at this time.
0 commit comments