Skip to content

Commit 65599be

Browse files
committed
Added test that components with type vars do compile.
1 parent c37be1e commit 65599be

File tree

4 files changed

+41
-0
lines changed

4 files changed

+41
-0
lines changed

tests/analysis_tests/tests/src/expected/Completion.res.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2037,6 +2037,16 @@ Path T
20372037
"modulePath": "TypeAtPosCompletion",
20382038
"filePath": "src/Completion.res"
20392039
}
2040+
}, {
2041+
"label": "TypeConstraint",
2042+
"kind": 9,
2043+
"tags": [],
2044+
"detail": "module TypeConstraint",
2045+
"documentation": null,
2046+
"data": {
2047+
"modulePath": "TypeConstraint",
2048+
"filePath": "src/Completion.res"
2049+
}
20402050
}, {
20412051
"label": "TypeDefinition",
20422052
"kind": 9,

tests/analysis_tests/tests/src/expected/CompletionJsxProps.res.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,16 @@ Path CompletionSupport.TestComponent.make
8989
"modulePath": "TypeAtPosCompletion",
9090
"filePath": "src/CompletionJsxProps.res"
9191
}
92+
}, {
93+
"label": "TypeConstraint",
94+
"kind": 9,
95+
"tags": [],
96+
"detail": "module TypeConstraint",
97+
"documentation": null,
98+
"data": {
99+
"modulePath": "TypeConstraint",
100+
"filePath": "src/CompletionJsxProps.res"
101+
}
92102
}, {
93103
"label": "TypeDefinition",
94104
"kind": 9,

tests/analysis_tests/tests/src/expected/typeConstraint.res.txt

Whitespace-only changes.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
@@jsxConfig({version: 4, mode: "classic"})
2+
3+
module V4C = {
4+
@react.component
5+
let make:
6+
type a. (~a: a, ~b: a, a) => React.element =
7+
(~a, ~b, _) => <div />
8+
}
9+
10+
let v4c = <V4C a=1 b=2 />
11+
12+
@@jsxConfig({version: 4, mode: "automatic"})
13+
14+
module V4A = {
15+
@react.component
16+
let make:
17+
type a. (~a: a, ~b: a, a) => React.element =
18+
(~a, ~b, _) => <div />
19+
}
20+
21+
let v4a = <V4A a=1 b=2 />

0 commit comments

Comments
 (0)