Closed
Description
/cc @vladima @ahejlsberg @billti
Motivating Examples
var arr = [1, 2, 3];
This should be an error (k
is always a string
):
for(var k in arr) {
if(k === 0) { ... }
}
This should not be an error, even under no implicit any:
for(var k in arr) {
if(arr[k] === 0) { ... }
}
This should somehow? not be an error, even though it involves a coercion we would normally disallow
for(var k in arr) {
if (k > 0) { ... }
}