File tree Expand file tree Collapse file tree 4 files changed +49
-13
lines changed
tests/analysis_tests/tests/src Expand file tree Collapse file tree 4 files changed +49
-13
lines changed Original file line number Diff line number Diff line change @@ -123,19 +123,6 @@ let rec print_out_type_doc (out_type : Outcometree.out_type) =
123123 (if non_gen then Doc. text " _" else Doc. nil);
124124 Doc. lbracket;
125125 Doc. indent (Doc. concat [opening; print_out_variant out_variant]);
126- (match labels with
127- | None | Some [] -> Doc. nil
128- | Some tags ->
129- Doc. group
130- (Doc. concat
131- [
132- Doc. space;
133- Doc. join ~sep: Doc. space
134- (List. map
135- (fun lbl ->
136- Printer. print_ident_like ~allow_uident: true lbl)
137- tags);
138- ]));
139126 Doc. soft_line;
140127 Doc. rbracket;
141128 ])
Original file line number Diff line number Diff line change @@ -150,3 +150,24 @@ type record = {
150150 @as ("foo_bar" )
151151 fooBar : int
152152}
153+
154+ type poly = [#a (int ) | #b (string ) | #c (float )]
155+
156+ type red = [#Ruby | #Redwood | #Rust ]
157+ type blue = [#Sapphire | #Neon | #Navy ]
158+ type color = [red | blue | #Papayawhip ]
159+
160+ external upperBound : ([< #d | #e | #f ]) => unit = "myexternal"
161+ external lowerBound : ([> #d | #e | #f ]) => unit = "myexternal"
162+
163+ module ComponentWithPolyProp = {
164+ @react.component
165+ let make = (~size = #large ) => {
166+ let className = switch size {
167+ | #large => "text-lg"
168+ | #small => "text-sm"
169+ }
170+
171+ <div className />
172+ }
173+ }
Original file line number Diff line number Diff line change @@ -24,6 +24,12 @@ Resolved opens 1 Stdlib
2424 "tags": [],
2525 "detail": "Package",
2626 "documentation": null
27+ }, {
28+ "label": "./CreateInterface.cmt",
29+ "kind": 4,
30+ "tags": [],
31+ "detail": "Local file",
32+ "documentation": null
2733 }, {
2834 "label": "./test.json",
2935 "kind": 4,
@@ -191,6 +197,12 @@ Resolved opens 1 Stdlib
191197 "tags": [],
192198 "detail": "Package",
193199 "documentation": null
200+ }, {
201+ "label": "./CreateInterface.cmt",
202+ "kind": 4,
203+ "tags": [],
204+ "detail": "Local file",
205+ "documentation": null
194206 }, {
195207 "label": "./test.json",
196208 "kind": 4,
@@ -216,6 +228,12 @@ Resolved opens 1 Stdlib
216228 "tags": [],
217229 "detail": "Package",
218230 "documentation": null
231+ }, {
232+ "label": "./CreateInterface.cmt",
233+ "kind": 4,
234+ "tags": [],
235+ "detail": "Local file",
236+ "documentation": null
219237 }, {
220238 "label": "./test.json",
221239 "kind": 4,
Original file line number Diff line number Diff line change @@ -114,4 +114,14 @@ type record = {
114114 @as("foo_bar")
115115 fooBar: int
116116}
117+ type poly = [#a(int) | #b(string) | #c(float)]
118+ type red = [#Ruby | #Redwood | #Rust]
119+ type blue = [#Sapphire | #Neon | #Navy]
120+ type color = [red | blue | #Papayawhip]
121+ external upperBound: ([< #d | #e | #f]) => unit = "myexternal"
122+ external lowerBound: ([> #d | #e | #f]) => unit = "myexternal"
123+ module ComponentWithPolyProp: {
124+ @react.component
125+ let make: (~size: [< #large | #small]=?) => Jsx.element
126+ }
117127
You can’t perform that action at this time.
0 commit comments