Closed iccir closed 9 years ago
Modifier issue.
Additional test cases:
- (void) foo
{
@each (_iterator in _array) {
[_iterator doSomething];
}
}
- (void) foo
{
var arr = [ 1, 2, 3 ];
var sum = 0;
@each (_iterator in arr) {
sum += _iterator;
}
return sum;
}
It's going to be too hard (and probably not worth it) to support using an ivar as the storage for the iteration, and I can't really think of any case where this would be common.
Fixing the simple case (@each(var i in _array)
) and making the compiler spit out an error in the additional cases (@each(_i in array)
).
The following is failing to compile: