summaryrefslogtreecommitdiffstats
path: root/tests/pureJava/DeclarationsInLoopsCE.java
blob: cc12f2b5795908a9e1c356dd5adbdd9a6e0b726d (plain)
1
2
3
4
5
6
7
8
9
10
11
/** @testcase PR#722 loop expressions not declarations */
public class DeclarationsInLoopsCE {
    void method() {
        boolean b = true;
        for (;b;) int j = 0; // CE 7 illegal start of expression, not a statement
        while (b) int k = 0; // CE 8 illegal start of expression, not a statement
        do int l = 0;  while (b); // CE 9 illegal start of expression, not a statement
    }
}