Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 52740 Details for
Bug 162073
[compiler] extraneous interface compatibility error
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Suggested fix + test cases modifications
org.eclipse.jdt.core_01.txt (text/plain), 8.51 KB, created by
Maxime Daniel
on 2006-10-26 07:43:43 EDT
(
hide
)
Description:
Suggested fix + test cases modifications
Filename:
MIME Type:
Creator:
Maxime Daniel
Created:
2006-10-26 07:43:43 EDT
Size:
8.51 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core.tests.model >Index: src/org/eclipse/jdt/core/tests/dom/BatchASTCreationTests.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/BatchASTCreationTests.java,v >retrieving revision 1.65 >diff -u -r1.65 BatchASTCreationTests.java >--- src/org/eclipse/jdt/core/tests/dom/BatchASTCreationTests.java 25 Oct 2006 13:01:14 -0000 1.65 >+++ src/org/eclipse/jdt/core/tests/dom/BatchASTCreationTests.java 26 Oct 2006 11:43:46 -0000 >@@ -1655,7 +1655,7 @@ > } > > // https://bugs.eclipse.org/bugs/show_bug.cgi?id=159631 >-public void _test073() throws CoreException, IOException { >+public void test073() throws CoreException, IOException { > try { > IJavaProject project = createJavaProject("P072", new String[] {}, Util.getJavaClassLibs(), "", "1.5"); > ICompilationUnit compilationUnits[] = new ICompilationUnit[3]; >#P org.eclipse.jdt.core.tests.compiler >Index: src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java,v >retrieving revision 1.103 >diff -u -r1.103 MethodVerifyTest.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java 19 Oct 2006 08:20:40 -0000 1.103 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java 26 Oct 2006 11:45:16 -0000 >@@ -708,12 +708,7 @@ > "abstract class X2 extends A implements J {}\n" > }, > "----------\n" + >- "1. ERROR in A.java (at line 1)\r\n" + >- " abstract class A implements I {}\r\n" + >- " ^\n" + >- "The return type is incompatible with J.foo(), I.foo()\n" + >- "----------\n" + >- "2. ERROR in A.java (at line 2)\r\n" + >+ "1. ERROR in A.java (at line 2)\r\n" + > " interface I extends J { Object foo(); }\r\n" + > " ^^^^^\n" + > "The return type is incompatible with J.foo()\n" + >Index: src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java,v >retrieving revision 1.543 >diff -u -r1.543 GenericTypeTest.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java 19 Oct 2006 12:11:12 -0000 1.543 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java 26 Oct 2006 11:45:01 -0000 >@@ -31231,28 +31231,18 @@ > public void test0987() { > String expectedOutput = new CompilerOptions(getCompilerOptions()).sourceLevel < ClassFileConstants.JDK1_6 > ? "----------\n" + >- "1. ERROR in X.java (at line 7)\n" + >- " abstract class GLinkElementView<M,CM> extends AbstractLinkView<M> {}\n" + >- " ^^^^^^^^^^^^^^^^\n" + >- "The return type is incompatible with EditPart.getViewer(), AbstractLinkView<M>.getViewer()\n" + >- "----------\n" + >- "2. ERROR in X.java (at line 11)\n" + >+ "1. 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" + >- "3. ERROR in X.java (at line 11)\n" + >+ "2. 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 7)\n" + >- " abstract class GLinkElementView<M,CM> extends AbstractLinkView<M> {}\n" + >- " ^^^^^^^^^^^^^^^^\n" + >- "The return type is incompatible with EditPart.getViewer(), AbstractLinkView<M>.getViewer()\n" + >- "----------\n" + >- "2. ERROR in X.java (at line 11)\n" + >+ "1. ERROR in X.java (at line 11)\n" + > " public ISheetViewer getViewer() { return null; } \n" + > " ^^^^^^^^^^^\n" + > "The return type is incompatible with EditPart.getViewer()\n" + >@@ -31344,7 +31334,7 @@ > "1. ERROR in X.java (at line 7)\n" + > " abstract class GLinkElementView<M,CM> extends AbstractLinkView<M> {}\n" + > " ^^^^^^^^^^^^^^^^\n" + >- "The return type is incompatible with ILinkViewElement.getViewer(), AbstractEditPart.getViewer(), AbstractLinkView<M>.getViewer()\n" + >+ "The return type is incompatible with AbstractEditPart.getViewer(), AbstractLinkView<M>.getViewer()\n" + > "----------\n" + > "2. ERROR in X.java (at line 11)\n" + > " public SheetViewer getViewer() { return null; } \n" + >Index: src/org/eclipse/jdt/core/tests/compiler/regression/AmbiguousMethodTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AmbiguousMethodTest.java,v >retrieving revision 1.21 >diff -u -r1.21 AmbiguousMethodTest.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/AmbiguousMethodTest.java 26 Oct 2006 07:00:21 -0000 1.21 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/AmbiguousMethodTest.java 26 Oct 2006 11:43:52 -0000 >@@ -1242,7 +1242,7 @@ > "ERROR"); > } > // https://bugs.eclipse.org/bugs/show_bug.cgi?id=162073 >-public void _test032() { >+public void test032() { > this.runConformTest( > new String[] { > "X.java", >@@ -1309,7 +1309,7 @@ > "2. ERROR in X.java (at line 10)\n" + > " public abstract class X implements J, K {\n" + > " ^\n" + >- "The return type is incompatible with I.foo(Number), K.foo(Number), J.foo(Number)\n" + >+ "The return type is incompatible with K.foo(Number), J.foo(Number)\n" + > "----------\n"); > } > // https://bugs.eclipse.org/bugs/show_bug.cgi?id=162065 >@@ -1369,7 +1369,7 @@ > "}\n" + > "public abstract class X extends J implements I {\n" + > " void bar() {\n" + >- " foo(0.0f);\n" + // ambiguous >+ " String s = foo(0.0f);\n" + // ambiguous > " }\n" + > "}" > }, >#P org.eclipse.jdt.core >Index: compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java,v >retrieving revision 1.139 >diff -u -r1.139 SourceTypeBinding.java >--- compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java 23 Oct 2006 08:01:16 -0000 1.139 >+++ compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java 26 Oct 2006 11:45:26 -0000 >@@ -1430,7 +1430,10 @@ > return this.scope.referenceContext.sourceStart; > } > SimpleLookupTable storedAnnotations(boolean forceInitialize) { >- if (forceInitialize && this.storedAnnotations == null) { >+ if (forceInitialize && this.storedAnnotations == null && >+ this.scope != null) { >+ // once scope is null, no more attempt to store annotations - >+ // as if the scope was present with storeAnnotations set to false > this.scope.referenceCompilationUnit().compilationResult.hasAnnotations = true; > if (!this.scope.environment().globalOptions.storeAnnotations) > return null; // not supported during this compile >Index: compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier15.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier15.java,v >retrieving revision 1.62 >diff -u -r1.62 MethodVerifier15.java >--- compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier15.java 12 Oct 2006 17:57:21 -0000 1.62 >+++ compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier15.java 26 Oct 2006 11:45:21 -0000 >@@ -528,7 +528,8 @@ > > inheritedMethod = computeSubstituteMethod(inheritedMethod, existingMethod); > return inheritedMethod != null >- && inheritedMethod.returnType == existingMethod.returnType >+ && (inheritedMethod.returnType == existingMethod.returnType || >+ inheritedMethod.returnType.isCompatibleWith(inheritedMethod.returnType)) > && super.isInterfaceMethodImplemented(inheritedMethod, existingMethod, superType); > } > SimpleSet findSuperinterfaceCollisions(ReferenceBinding superclass, ReferenceBinding[] superInterfaces) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 162073
:
52740
|
53361
|
57406