don't move expressions containing the binary in operator into the for initializer

(opera can't parse it)

close #25
This commit is contained in:
Mihai Bazon
2012-10-30 14:50:47 +02:00
parent 0852f5595e
commit abe0ebbf02
2 changed files with 49 additions and 6 deletions

View File

@@ -127,3 +127,35 @@ lift_sequences_4: {
x = baz;
}
}
for_sequences: {
options = { sequences: true };
input: {
// 1
foo();
bar();
for (; false;);
// 2
foo();
bar();
for (x = 5; false;);
// 3
x = (foo in bar);
for (; false;);
// 4
x = (foo in bar);
for (y = 5; false;);
}
expect: {
// 1
for (foo(), bar(); false;);
// 2
for (foo(), bar(), x = 5; false;);
// 3
x = (foo in bar);
for (; false;);
// 4
x = (foo in bar);
for (y = 5; false;);
}
}