Commit e9d88c7
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 74ebee0 commit e9d88c7
File tree
4 files changed
+17
-11
lines changed- compiler/src/dotty/tools/dotc
- core
- transform
- tests/run-custom-args/fatal-warnings
4 files changed
+17
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2526 | 2526 | | |
2527 | 2527 | | |
2528 | 2528 | | |
2529 | | - | |
2530 | | - | |
2531 | | - | |
2532 | | - | |
2533 | 2529 | | |
2534 | 2530 | | |
2535 | 2531 | | |
| |||
2570 | 2566 | | |
2571 | 2567 | | |
2572 | 2568 | | |
2573 | | - | |
| 2569 | + | |
2574 | 2570 | | |
2575 | | - | |
| 2571 | + | |
2576 | 2572 | | |
2577 | 2573 | | |
2578 | 2574 | | |
| |||
| 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 | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| |||
0 commit comments