aboutsummaryrefslogtreecommitdiffstats
path: root/tests/pureJava/DeclarationsInLoopsCE.java
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pureJava/DeclarationsInLoopsCE.java')
-rw-r--r--tests/pureJava/DeclarationsInLoopsCE.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/pureJava/DeclarationsInLoopsCE.java b/tests/pureJava/DeclarationsInLoopsCE.java
new file mode 100644
index 000000000..cc12f2b57
--- /dev/null
+++ b/tests/pureJava/DeclarationsInLoopsCE.java
@@ -0,0 +1,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
+ }
+}