File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed
tests/analysis_tests/tests/src Expand file tree Collapse file tree 2 files changed +29
-0
lines changed 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 with type t = 'b)) => t<'b, 'a>
134+ }
127135
You can’t perform that action at this time.
0 commit comments