diff options
author | Andy Clement | 2013-05-16 07:57:10 +0000 |
---|---|---|
committer | Jayaprakash Arthanareeswaran | 2013-05-16 10:59:15 +0000 |
commit | d504f3ee4554d924263bccdb7da657985d25b9cf (patch) | |
tree | 2df0967d04648bd4b1ccb37c9123feef7e1eae7c /org.eclipse.jdt.core.tests.compiler | |
parent | 5307df6ab365bbef43ce64f312671ce658989b80 (diff) | |
download | eclipse.jdt.core-d504f3ee4554d924263bccdb7da657985d25b9cf.tar.gz eclipse.jdt.core-d504f3ee4554d924263bccdb7da657985d25b9cf.tar.xz eclipse.jdt.core-d504f3ee4554d924263bccdb7da657985d25b9cf.zip |
Bug 406928 - computation of inherited methods seems damaged (affecting
@Overrides)
Diffstat (limited to 'org.eclipse.jdt.core.tests.compiler')
2 files changed, 51 insertions, 5 deletions
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java index f83ec1fab9..85d773c4c8 100644 --- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java +++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java @@ -17,6 +17,8 @@ * bug 388800 - [1.8] adjust tests to 1.8 JRE * bug 388795 - [compiler] detection of name clash depends on order of super interfaces * bug 388739 - [1.8][compiler] consider default methods when detecting whether a class needs to be declared abstract + * bug 395681 - [compiler] Improve simulation of javac6 behavior from bug 317719 after fixing bug 388795 + * bug 406928 - computation of inherited methods seems damaged (affecting @Overrides) *******************************************************************************/ package org.eclipse.jdt.core.tests.compiler.regression; @@ -32480,18 +32482,28 @@ public void test0986() { public void test0987() { String expectedOutput = new CompilerOptions(getCompilerOptions()).sourceLevel < ClassFileConstants.JDK1_6 ? "----------\n" + - "1. ERROR in X.java (at line 11)\n" + + "1. ERROR in X.java (at line 7)\n" + + " abstract class GLinkElementView<M,CM> extends AbstractLinkView<M> {}\n" + + " ^^^^^^^^^^^^^^^^\n" + + "The return types are incompatible for the inherited methods EditPart.getViewer(), AbstractLinkView<M>.getViewer()\n" + + "----------\n" + + "2. ERROR in X.java (at line 11)\n" + " public ISheetViewer getViewer() { return null; } \n" + " ^^^^^^^^^^^^\n" + "The return type is incompatible with EditPart.getViewer()\n" + "----------\n" + - "2. ERROR in X.java (at line 11)\n" + + "3. ERROR in X.java (at line 11)\n" + " public ISheetViewer getViewer() { return null; } \n" + " ^^^^^^^^^^^\n" + "The method getViewer() of type AbstractLinkView<M> must override a superclass method\n" + "----------\n" : "----------\n" + - "1. ERROR in X.java (at line 11)\n" + + "1. ERROR in X.java (at line 7)\n" + + " abstract class GLinkElementView<M,CM> extends AbstractLinkView<M> {}\n" + + " ^^^^^^^^^^^^^^^^\n" + + "The return types are incompatible for the inherited methods EditPart.getViewer(), AbstractLinkView<M>.getViewer()\n" + + "----------\n" + + "2. ERROR in X.java (at line 11)\n" + " public ISheetViewer getViewer() { return null; } \n" + " ^^^^^^^^^^^^\n" + "The return type is incompatible with EditPart.getViewer()\n" + @@ -32580,7 +32592,12 @@ public void test0988() { "}", // ================= }, "----------\n" + - "1. ERROR in X.java (at line 11)\n" + + "1. ERROR in X.java (at line 7)\n" + + " abstract class GLinkElementView<M,CM> extends AbstractLinkView<M> {}\n" + + " ^^^^^^^^^^^^^^^^\n" + + "The return types are incompatible for the inherited methods ILinkViewElement.getViewer(), EditPart.getViewer(), AbstractLinkView<M>.getViewer()\n" + + "----------\n" + + "2. ERROR in X.java (at line 11)\n" + " public SheetViewer getViewer() { return null; } \n" + " ^^^^^^^^^^^\n" + "The return type is incompatible with AbstractEditPart.getViewer()\n" + 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 653d2b9e5c..b116ab15ac 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 @@ -11,11 +11,21 @@ * * Contributors: * IBM Corporation - initial API and implementation +<<<<<<< BETA_JAVA8 * Stephan Herrmann - Contribution for * bug 388800 - [1.8] adjust tests to 1.8 JRE +======= + * Stephan Herrmann - Contributions for +>>>>>>> 97c9363 Bug 406928 - computation of inherited methods seems damaged (affecting @Overrides) * bug 388795 - [compiler] detection of name clash depends on order of super interfaces +<<<<<<< BETA_JAVA8 * bug 388739 - [1.8][compiler] consider default methods when detecting whether a class needs to be declared abstract * bug 402237 - [1.8][compiler] investigate differences between compilers re MethodVerifyTest +======= + * bug 395681 - [compiler] Improve simulation of javac6 behavior from bug 317719 after fixing bug 388795 + * Andy Clement - Contribution for + * bug 406928 - computation of inherited methods seems damaged (affecting @Overrides) +>>>>>>> 97c9363 Bug 406928 - computation of inherited methods seems damaged (affecting @Overrides) *******************************************************************************/ package org.eclipse.jdt.core.tests.compiler.regression; @@ -37,7 +47,7 @@ import org.eclipse.jdt.internal.compiler.impl.CompilerOptions; public class MethodVerifyTest extends AbstractComparableTest { static { -// TESTS_NAMES = new String[] { "testBug317719" }; +// TESTS_NAMES = new String[] { "testBug406928" }; // TESTS_NUMBERS = new int[] { 213 }; // TESTS_RANGE = new int[] { 190, -1}; } @@ -13911,4 +13921,23 @@ public void testBug384580() { "Name clash: The method m() of type Foo has the same erasure as m() of type Y but does not override it\n" + "----------\n"); } +// https://bugs.eclipse.org/406928 - computation of inherited methods seems damaged (affecting @Overrides) +public void testBug406928() { + if (this.complianceLevel < ClassFileConstants.JDK1_6) return; + this.runConformTest( + new String[] { + "TestPointcut.java", + "interface MethodMatcher {\n"+ + " boolean matches();\n"+ + "}\n"+ + "abstract class StaticMethodMatcher implements MethodMatcher { }\n"+ + "abstract class StaticMethodMatcherPointcut extends StaticMethodMatcher { }\n"+ + "\n"+ + "class TestPointcut extends StaticMethodMatcherPointcut {\n"+ + " @Override\n"+ + " public boolean matches() { return false; } \n"+ + "}\n" + }, + ""); +} } |