Commit d1b9a01
Handle type alias in capturing wildcards
We extend capturing wildcards so that it operates on the type after
dealiasing. However, in line with, for example, derivedRefinedType, we
want to return the original type if nothing was captured, because it's
on that basis that adapt decides whether it needs to cast and re-adapt
to the new type with the type boxes.
Co-authored-by: Seth Tisue <[email protected]>1 parent 7d702a3 commit d1b9a01
File tree
4 files changed
+52
-16
lines changed- compiler/src/dotty/tools/dotc/typer
- tests/pos
4 files changed
+52
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
499 | 499 | | |
500 | 500 | | |
501 | 501 | | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
502 | 510 | | |
503 | 511 | | |
504 | 512 | | |
505 | 513 | | |
506 | 514 | | |
507 | | - | |
| 515 | + | |
508 | 516 | | |
509 | | - | |
510 | | - | |
511 | | - | |
512 | | - | |
513 | | - | |
514 | | - | |
515 | | - | |
516 | | - | |
517 | | - | |
518 | | - | |
519 | | - | |
520 | | - | |
521 | | - | |
522 | | - | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
523 | 524 | | |
| 525 | + | |
524 | 526 | | |
525 | 527 | | |
526 | 528 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3160 | 3160 | | |
3161 | 3161 | | |
3162 | 3162 | | |
3163 | | - | |
| 3163 | + | |
3164 | 3164 | | |
3165 | 3165 | | |
3166 | 3166 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
0 commit comments