Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSasikanth Bharadwaj2017-11-24 10:03:22 +0000
committerSasikanth Bharadwaj2017-11-24 10:03:58 +0000
commita7c7607635deb02672f2c1cb4ea8c2cdbe0585cc (patch)
tree6bf911940b166cf06495e7db43283aa20c911de5
parent4175263e3e112b5a35199f6925171f03f336691c (diff)
downloadeclipse.jdt.core-a7c7607635deb02672f2c1cb4ea8c2cdbe0585cc.tar.gz
eclipse.jdt.core-a7c7607635deb02672f2c1cb4ea8c2cdbe0585cc.tar.xz
eclipse.jdt.core-a7c7607635deb02672f2c1cb4ea8c2cdbe0585cc.zip
Regression test for bug 458457I20171125-1500I20171124-2000
-rw-r--r--org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InterfaceMethodsTest.java58
1 files changed, 57 insertions, 1 deletions
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InterfaceMethodsTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InterfaceMethodsTest.java
index 8f780c8be5..8024a3e835 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InterfaceMethodsTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InterfaceMethodsTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2013, 2016 GK Software AG, IBM Corporation and others.
+ * Copyright (c) 2013, 2017 GK Software AG, 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
@@ -3052,4 +3052,60 @@ public class InterfaceMethodsTest extends AbstractComparableTest {
"The default method spliterator() inherited from Y<E> conflicts with another method inherited from X<E>\n" +
"----------\n");
}
+ public void test458547_comment0_a() throws Exception {
+ this.runNegativeTest(
+ new String[] {
+ "JavaTest.java",
+ "public class JavaTest {\n" +
+ " interface A {\n" +
+ " default void foo() { }\n" +
+ " }\n" +
+ " interface B {\n" +
+ " void foo();\n" +
+ " }\n" +
+ " interface C {\n" +
+ " void foo();\n" +
+ " }\n" +
+ " interface D extends A, B {\n" +
+ " @Override default void foo() { }\n" +
+ " }\n" +
+ " class E implements A, B, C, D {\n" +
+ " }\n" +
+ "}"
+ },
+ "----------\n" +
+ "1. ERROR in JavaTest.java (at line 14)\n" +
+ " class E implements A, B, C, D {\n" +
+ " ^\n" +
+ "The default method foo() inherited from JavaTest.D conflicts with another method inherited from JavaTest.C\n" +
+ "----------\n");
+ }
+ public void test458547_comment0_b() throws Exception {
+ this.runNegativeTest(
+ new String[] {
+ "JavaTest.java",
+ "public class JavaTest {\n" +
+ " interface A {\n" +
+ " default void foo() { }\n" +
+ " }\n" +
+ " interface B {\n" +
+ " void foo();\n" +
+ " }\n" +
+ " interface C {\n" +
+ " void foo();\n" +
+ " }\n" +
+ " interface D extends A, B {\n" +
+ " @Override default void foo() { }\n" +
+ " }\n" +
+ " class E implements B, C, A, D {\n" +
+ " }\n" +
+ "}"
+ },
+ "----------\n" +
+ "1. ERROR in JavaTest.java (at line 14)\n" +
+ " class E implements B, C, A, D {\n" +
+ " ^\n" +
+ "The default method foo() inherited from JavaTest.D conflicts with another method inherited from JavaTest.C\n" +
+ "----------\n");
+ }
}

Back to the top