Commit a483d4a
committed
Fix Unit ascriptions in erasure
We should simply drop a Unit ascription, not ascribe BoxedUnit instead. This fixes
a case in `nullAsInstanceOf.scala`. Now
null.asInstanceOf[Unit]
is `()`, whereas before it was `null` `()` is correct, or at least it
is the same behavior as for all other primitive types.1 parent fe6c10f commit a483d4a
File tree
2 files changed
+10
-9
lines changed- compiler/src/dotty/tools/dotc/transform
- tests/run
2 files changed
+10
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
588 | 588 | | |
589 | 589 | | |
590 | 590 | | |
591 | | - | |
| 591 | + | |
592 | 592 | | |
593 | | - | |
594 | | - | |
595 | | - | |
596 | | - | |
597 | | - | |
598 | | - | |
599 | | - | |
600 | | - | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
601 | 602 | | |
602 | 603 | | |
603 | 604 | | |
| |||
Binary file not shown.
0 commit comments