Commit d50da57
committed
ordinal: drop unchecked with sealed abstract skips
In the `ordinal` method, drop the use of `@unchecked` by skipping
children that are sealed traits or sealed abstract classes and don't
have any anonymous subclasses.
The `@unchecked` I added in ee5a82f.
In a PR to specifically with reachability I started similar warnings in
`ordinal` (this was before adding `@unchecked` was merged) so I'm hoping
with this patch to avoid the false positives properly.1 parent 74376f3 commit d50da57
File tree
4 files changed
+26
-9
lines changed- compiler/src/dotty/tools/dotc
- core
- transform
- tests/pos
4 files changed
+26
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2507 | 2507 | | |
2508 | 2508 | | |
2509 | 2509 | | |
2510 | | - | |
2511 | | - | |
2512 | | - | |
2513 | | - | |
2514 | 2510 | | |
2515 | 2511 | | |
2516 | 2512 | | |
| |||
2551 | 2547 | | |
2552 | 2548 | | |
2553 | 2549 | | |
2554 | | - | |
| 2550 | + | |
2555 | 2551 | | |
2556 | | - | |
| 2552 | + | |
2557 | 2553 | | |
2558 | 2554 | | |
2559 | 2555 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
249 | 253 | | |
250 | 254 | | |
251 | 255 | | |
| |||
Lines changed: 9 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
517 | 517 | | |
518 | 518 | | |
519 | 519 | | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
520 | 526 | | |
521 | | - | |
| 527 | + | |
522 | 528 | | |
523 | | - | |
| 529 | + | |
524 | 530 | | |
525 | 531 | | |
526 | | - | |
| 532 | + | |
527 | 533 | | |
528 | 534 | | |
529 | 535 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
0 commit comments