Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Herrmann2016-01-21 21:07:04 +0000
committerStephan Herrmann2016-01-21 21:07:04 +0000
commit15e12704b5fe87fe1d47a0f7d9c59648af6bf5b4 (patch)
treefb50b953aad7d08ae7134ef01f92814f74b2e56e /org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/EnumTest.java
parent2355063690e3d1e9ce8807ee397ad7cbc1de5aa8 (diff)
downloadorg.eclipse.objectteams-15e12704b5fe87fe1d47a0f7d9c59648af6bf5b4.tar.gz
org.eclipse.objectteams-15e12704b5fe87fe1d47a0f7d9c59648af6bf5b4.tar.xz
org.eclipse.objectteams-15e12704b5fe87fe1d47a0f7d9c59648af6bf5b4.zip
Update jdt.core to I20160119-0800 towards 4.6 M5
Diffstat (limited to 'org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/EnumTest.java')
-rw-r--r--org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/EnumTest.java49
1 files changed, 48 insertions, 1 deletions
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/EnumTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/EnumTest.java
index 4e3012ebe..28ccc492c 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/EnumTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/EnumTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2014 IBM Corporation and others.
+ * Copyright (c) 2000, 2015 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7118,4 +7118,51 @@ public void test434442() {
"\n"
});
}
+public void test476281() {
+ if (this.complianceLevel < ClassFileConstants.JDK1_8)
+ return;
+ this.runConformTest(new String[] {
+ "LambdaEnumLocalClassBug.java",
+ "public enum LambdaEnumLocalClassBug {\n" +
+ " A(() -> {\n" +
+ " class Foo {\n" +
+ " }\n" +
+ " new Foo();\n" +
+ " System.out.println(\"Success\");\n" +
+ " })\n" +
+ ";\n" +
+ " private final Runnable runnable;\n" +
+ " private LambdaEnumLocalClassBug(Runnable runnable) {\n" +
+ " this.runnable = runnable;\n" +
+ " }\n" +
+ " public static void main(String[] args) {\n" +
+ " A.runnable.run();\n" +
+ " }\n" +
+ "}"},
+ "Success");
+}
+public void test476281a() {
+ this.runConformTest(new String[] {
+ "Test.java",
+ "public enum Test {\n" +
+ " B(new Runnable() {\n" +
+ " public void run() {\n" +
+ " //\n" +
+ " class Foo {\n" +
+ " \n" +
+ " }\n" +
+ " new Foo();\n" +
+ " System.out.println(\"Success\");\n" +
+ " }\n" +
+ "});\n" +
+ " private final Runnable runnable;\n" +
+ " private Test(Runnable runnable) {\n" +
+ " this.runnable = runnable;\n" +
+ " }\n" +
+ " public static void main(String[] args) {\n" +
+ " B.runnable.run();\n" +
+ " }\n" +
+ "}"},
+ "Success");
+}
}

Back to the top