Repository navigation
Commit a391dea
committed
fix: reset updatedStates between exclusive switch cases
SwitchStatement visited every case on a shared switchScope, so
recordUpdate marked setter calls on that scope and later sibling cases
saw them via checkReadAfterUpdate even when break made the update
unreachable. This emitted a false OCTANE_STRONG_READ_AFTER_SET hint for
mutually exclusive cases—the same control flow if/else already excludes
because each arm creates its own nested block scope.
Reset switchScope.updatedStates to undefined after each terminated case
(break/return/throw/continue) so the next case starts without inherited
updates. Fallthrough cases still accumulate correctly because the reset
only fires when the case exits.1 parent 02a8491 commit a391dea
2 files changed
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5557 | 5557 | | |
5558 | 5558 | | |
5559 | 5559 | | |
| 5560 | + | |
5560 | 5561 | | |
5561 | 5562 | | |
5562 | 5563 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
893 | 893 | | |
894 | 894 | | |
895 | 895 | | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
896 | 901 | | |
897 | 902 | | |
898 | 903 | | |
| |||
945 | 950 | | |
946 | 951 | | |
947 | 952 | | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
948 | 957 | | |
949 | 958 | | |
950 | 959 | | |
| |||
0 commit comments