diff options
author | Sasikanth Bharadwaj | 2017-11-24 10:03:22 +0000 |
---|---|---|
committer | Sasikanth Bharadwaj | 2017-11-24 10:03:58 +0000 |
commit | a7c7607635deb02672f2c1cb4ea8c2cdbe0585cc (patch) | |
tree | 6bf911940b166cf06495e7db43283aa20c911de5 | |
parent | 4175263e3e112b5a35199f6925171f03f336691c (diff) | |
download | eclipse.jdt.core-a7c7607635deb02672f2c1cb4ea8c2cdbe0585cc.tar.gz eclipse.jdt.core-a7c7607635deb02672f2c1cb4ea8c2cdbe0585cc.tar.xz eclipse.jdt.core-a7c7607635deb02672f2c1cb4ea8c2cdbe0585cc.zip |
Regression test for bug 458457I20171125-1500I20171124-2000
Change-Id: I3737e6fe6fb605f90ae4856ba794949f7784fedb
-rw-r--r-- | org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InterfaceMethodsTest.java | 58 |
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"); + } } |