5.6 For-In Statements
In a ‘for-in’ statement of the form
for (v in expr) statement
v must be an expression classified as a reference of type Any or the String primitive type, and expr must be an expression of type Any, an object type, or a type parameter type.
In a ‘for-in’ statement of the form
for (var v in expr) statement
v must be a variable declaration without a type annotation that declares a variable of type Any, and expr must be an expression of type Any, an object type, or a type parameter type.