noUncheckedIndexAccess behavior with for...in loops with a constant
#45169
Labels
Working as Intended
The behavior described is the intended behavior; this is not a bug
Bug Report
Using a
for...inloop with a constant key variable errors withnoUncheckedIndexAccess.for...in
noUncheckedIndexAccess
for(const in)
Seen in v4.1.5 (oldest playground with noUncheckedIndexAccess) and next (v4.4.0-dev.20210723 at time of writing)
Playground link with relevant code
Error:
No error, key is in object by the
for...inloop and clearly isn't modified as variable is constThe text was updated successfully, but these errors were encountered: