/cc @vladima @ahejlsberg @billti
Motivating Examples
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) { ... }
}
/cc @vladima @ahejlsberg @billti
Motivating Examples
This should be an error (
kis always astring):This should not be an error, even under no implicit any:
This should somehow? not be an error, even though it involves a coercion we would normally disallow