Commit 31cd178
committed
Re-use SkolemType for arguments
There are at least two instances where we might skolemize the type of an argument.
One is in safeSubstParams when we compute a result type of a dependent method type
application. The other is in constrainIfDependentParamRef where we constrain type
variables representing dependent parameters.
This used to give several skolem types that ended up in a common OrType. We now
store computed skolem types in attachments of argument types and re-use them if
possible.1 parent 0ee4c20 commit 31cd178
File tree
3 files changed
+21
-4
lines changed- compiler/src/dotty/tools/dotc/typer
- tests/pos
3 files changed
+21
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
853 | 854 | | |
854 | 855 | | |
855 | 856 | | |
856 | | - | |
| 857 | + | |
| 858 | + | |
857 | 859 | | |
858 | 860 | | |
859 | 861 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
277 | 277 | | |
278 | 278 | | |
279 | 279 | | |
280 | | - | |
| 280 | + | |
281 | 281 | | |
282 | 282 | | |
283 | 283 | | |
| |||
574 | 574 | | |
575 | 575 | | |
576 | 576 | | |
577 | | - | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
578 | 593 | | |
579 | 594 | | |
580 | 595 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
0 commit comments