Commit d02d4b8
committed
Avoid erasure/preErasure issues around Any in transformIsInstanceOf
The testType Any is erased to Object, but the expr type Int isn't erased
to Integer, so then it fails as Int !<: Object. We avoid the problem by
feeding in AnyVal, leading to a (possibly elided) non-null test only.1 parent 4293a45 commit d02d4b8
File tree
2 files changed
+7
-1
lines changed- compiler/src/dotty/tools/dotc/transform
- tests/pos
2 files changed
+7
-1
lines changedLines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
358 | 358 | | |
359 | 359 | | |
360 | 360 | | |
361 | | - | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
362 | 366 | | |
363 | 367 | | |
364 | 368 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
0 commit comments