Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Herrmann2014-03-01 13:43:15 +0000
committerStephan Herrmann2014-03-01 13:45:24 +0000
commit077886653bb15b3cde6b2326207364f8fca8f3f7 (patch)
tree69167ebf300d0d533a7f700366e63961bfe0cf4d
parent76226936180e26d9e682e909ba765fff61d327d9 (diff)
downloadeclipse.jdt.core-077886653bb15b3cde6b2326207364f8fca8f3f7.tar.gz
eclipse.jdt.core-077886653bb15b3cde6b2326207364f8fca8f3f7.tar.xz
eclipse.jdt.core-077886653bb15b3cde6b2326207364f8fca8f3f7.zip
Bug 426546 - [BETA_JAVA8] Build Eclipse Luna SDK with our Java 8
compiler - test to assure that an inherited bridge method need not be repeated
-rw-r--r--org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java26
1 files changed, 26 insertions, 0 deletions
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java
index 71e90f104b..81a7b90ac2 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java
@@ -14057,4 +14057,30 @@ public void test423849() {
"}\n"
});
}
+// assure that an inherited bridge method need not be repeated
+public void testBug426546() {
+ runConformTest(
+ new String[] {
+ "C.java",
+ "class A {\n" +
+ " A getMe() { return null; }\n" +
+ "}\n" +
+ "class B extends A {\n" +
+ " B getMe() { return null; }\n" +
+ "}\n" +
+ "public class C extends B {\n" +
+ " C getMe() { return this; }\n" +
+ " public String toString() { return \"C\"; }\n" +
+ " public static void main(String[] args) {\n" +
+ " C c = new C();\n" +
+ " System.out.print(c.getMe());\n" +
+ " B b = c;\n" +
+ " System.out.print(b.getMe());\n" +
+ " A a = c;\n" +
+ " System.out.print(a.getMe()); \n" +
+ " }\n" +
+ "}\n"
+ },
+ "CCC");
+}
}

Back to the top