Commit 5769aa5
committed
Never fail a subtype test if atoms don't compare
Singleton types can be aliases of other singleton types (or unions
of singletons) in complex ways which atoms don't reflect currently.
So to be conservative we should use atoms only for confirming
subtype relationships, never for rejecting them.1 parent 047a449 commit 5769aa5
File tree
2 files changed
+4
-5
lines changed- compiler/src/dotty/tools/dotc/core
- tests/pos
2 files changed
+4
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
432 | 432 | | |
433 | 433 | | |
434 | 434 | | |
435 | | - | |
436 | | - | |
437 | | - | |
| 435 | + | |
| 436 | + | |
438 | 437 | | |
439 | 438 | | |
440 | 439 | | |
| |||
600 | 599 | | |
601 | 600 | | |
602 | 601 | | |
603 | | - | |
604 | | - | |
| 602 | + | |
605 | 603 | | |
606 | 604 | | |
607 | 605 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
0 commit comments