Commit ef7db7a
committed
Make aliases of
Make `isMatch` false for applied `MatchAlias`es,
i.e. true only for `MatchType`s and higher-kinded abstraction of them.
As a result, code using `isMatch` to choose between a `TypeAlias` and `MatchAlias`
will now use a `TypeAlias` when aliasing a `MatchAlias`.
Which in turn allows for better de-aliasing, since `dealias` only de-aliases standard type aliases.
The logic for this distinction has also been extracted to the common `AliasingBounds` supertype.
`tryNormalize` on `AppliedType`s should only attempt reduction if there is an underlying match type.
This could previously be identified by a `MatchAlias` tycon. We now need a recursive check.MatchAliases normal TypeAliases1 parent 90c3fbd commit ef7db7a
File tree
9 files changed
+70
-26
lines changed- compiler
- src/dotty/tools/dotc
- core
- tasty
- inlines
- typer
- test/dotc
- tests
- neg-macros
- pos-macros
- pos
9 files changed
+70
-26
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
461 | 461 | | |
462 | 462 | | |
463 | 463 | | |
464 | | - | |
| 464 | + | |
465 | 465 | | |
466 | 466 | | |
467 | 467 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
458 | 458 | | |
459 | 459 | | |
460 | 460 | | |
461 | | - | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
462 | 465 | | |
463 | 466 | | |
464 | 467 | | |
| |||
4587 | 4590 | | |
4588 | 4591 | | |
4589 | 4592 | | |
4590 | | - | |
4591 | | - | |
| 4593 | + | |
| 4594 | + | |
4592 | 4595 | | |
4593 | 4596 | | |
4594 | 4597 | | |
| 4598 | + | |
| 4599 | + | |
| 4600 | + | |
| 4601 | + | |
| 4602 | + | |
| 4603 | + | |
| 4604 | + | |
4595 | 4605 | | |
4596 | 4606 | | |
4597 | 4607 | | |
4598 | 4608 | | |
4599 | | - | |
4600 | 4609 | | |
4601 | 4610 | | |
4602 | 4611 | | |
| |||
4606 | 4615 | | |
4607 | 4616 | | |
4608 | 4617 | | |
4609 | | - | |
| 4618 | + | |
| 4619 | + | |
| 4620 | + | |
| 4621 | + | |
| 4622 | + | |
| 4623 | + | |
4610 | 4624 | | |
4611 | 4625 | | |
4612 | 4626 | | |
| |||
5636 | 5650 | | |
5637 | 5651 | | |
5638 | 5652 | | |
| 5653 | + | |
| 5654 | + | |
| 5655 | + | |
| 5656 | + | |
| 5657 | + | |
| 5658 | + | |
| 5659 | + | |
| 5660 | + | |
5639 | 5661 | | |
5640 | 5662 | | |
5641 | 5663 | | |
| |||
Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
412 | 412 | | |
413 | 413 | | |
414 | 414 | | |
415 | | - | |
416 | | - | |
417 | | - | |
| 415 | + | |
418 | 416 | | |
419 | 417 | | |
420 | 418 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
452 | 452 | | |
453 | 453 | | |
454 | 454 | | |
455 | | - | |
456 | | - | |
457 | | - | |
| 455 | + | |
| 456 | + | |
458 | 457 | | |
459 | 458 | | |
460 | 459 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
519 | 519 | | |
520 | 520 | | |
521 | 521 | | |
522 | | - | |
523 | | - | |
524 | | - | |
| 522 | + | |
525 | 523 | | |
526 | 524 | | |
527 | 525 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
5 | 15 | | |
6 | 16 | | |
7 | 17 | | |
| 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