Chromium Code Reviews
DescriptionAvoid repeated declaration of the same loop variable.
The following code:
void main() {
int j = 0;
for (int i = 0; i < 10; i++) {
j++;
}
}
would generate the following:
for (var j = 0, i = 0; i < 10; ) {
j = j + 1;
var i = i + 1;
}
with this change the 'var' in the body disappears.
R=ngeoffray@google.com
BUG=
TEST=
Committed: https://code.google.com/p/dart/source/detail?r=8192
Patch Set 1 #
Messages
Total messages: 2 (0 generated)
|
|||||||||||||||||||||||||||||||||||||