You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is possible to generate a "Variable 'X' is used before being assigned." error on TypeScript 4.9 where it previously did not in TypeScript 4.8. This seems to be when we have combination of switch statements and for loop.
Bug Report
It is possible to generate a
"Variable 'X' is used before being assigned."
error on TypeScript 4.9 where it previously did not in TypeScript 4.8. This seems to be when we have combination ofswitch
statements andfor
loop.🔎 Search Terms
switch
for
type check
🕗 Version & Regression Information
⏯ Playground Link
TypeScript 4.8.4 Playground Example
TypeScript 4.9.3 Playground Example
Nightly Playground Example
💻 Code
🙁 Actual behavior
Variable 'key' is used before being assigned.
🙂 Expected behavior
No error
The text was updated successfully, but these errors were encountered: