Commit 746f50b
committed
Record constraint against tvar parameters
Instead of using TypeVar#underlying, which uses Constraint#instType,
relying only on TypeVar#inst. That way we can record constraints
against the original parameter and _then_ maximise the type, which
results in `Bar[String]` instead of `Bar[X]`, in both cases with `X :=
String` recorded in the GADT constraint.1 parent fd38489 commit 746f50b
File tree
4 files changed
+14
-22
lines changed- compiler/src/dotty/tools/dotc/core
- tests/pos
4 files changed
+14
-22
lines changedLines changed: 3 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
255 | | - | |
256 | | - | |
| 255 | + | |
257 | 256 | | |
258 | 257 | | |
259 | 258 | | |
| |||
268 | 267 | | |
269 | 268 | | |
270 | 269 | | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
| 270 | + | |
| 271 | + | |
277 | 272 | | |
278 | 273 | | |
279 | 274 | | |
| |||
Lines changed: 3 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
| 165 | + | |
169 | 166 | | |
170 | 167 | | |
171 | 168 | | |
172 | 169 | | |
173 | 170 | | |
174 | | - | |
| 171 | + | |
175 | 172 | | |
176 | 173 | | |
177 | 174 | | |
| |||
548 | 545 | | |
549 | 546 | | |
550 | 547 | | |
551 | | - | |
| 548 | + | |
552 | 549 | | |
553 | 550 | | |
554 | 551 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
120 | | - | |
| 120 | + | |
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| |||
1201 | 1201 | | |
1202 | 1202 | | |
1203 | 1203 | | |
1204 | | - | |
| 1204 | + | |
1205 | 1205 | | |
1206 | 1206 | | |
1207 | 1207 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
| 21 | + | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
0 commit comments