Array binding pattern with only OmittedExpressions does not check RHS of for-of loop #48630
Labels
Bug
A bug in TypeScript
Good First Issue
Well scoped, documented and has the green light
Help Wanted
You can do this
Milestone
Bug Report
array binding patterns for-of loop omittedexpression binding elements
Playground link with relevant code
The right hand side of the for-of loop is not checked at all.
This appears to be because
OmittedExpression
is not actually aBindingElement
and the right hand side's type is only checked whenever encountering aBindingElement
incheckVariableLikeDeclaration
or when there are no elements in the pattern.The right hand side of the for-of loop to be checked.
The text was updated successfully, but these errors were encountered: