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 69988 Details for
Bug 190748
[1.5][compiler] AbstractMethodError on derived implementation of derived Interface declaration
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed patch
patch.txt (text/plain), 2.83 KB, created by
Kent Johnson
on 2007-06-04 13:01:24 EDT
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Kent Johnson
Created:
2007-06-04 13:01:24 EDT
Size:
2.83 KB
patch
obsolete
>Index: src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_5.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_5.java,v >retrieving revision 1.71 >diff -u -r1.71 Compliance_1_5.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_5.java 6 Mar 2007 04:42:12 -0000 1.71 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_5.java 4 Jun 2007 16:58:32 -0000 >@@ -3454,6 +3454,30 @@ > ""); > } > >+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=190748 >+public void test106() { >+ this.runConformTest( >+ new String[] { >+ "X.java", >+ "public class X {\n" + >+ " public static void main(String[] s) { ((IBase) new Impl()).get(); }\n" + >+ "}\n" + >+ "class Impl extends AImpl implements IBase, IEnhanced {}\n" + >+ "interface IBase {\n" + >+ " IBaseReturn get();\n" + >+ "}\n" + >+ "interface IEnhanced extends IBase {\n" + >+ " IEnhancedReturn get();\n" + >+ "}\n" + >+ "abstract class AImpl {\n" + >+ " public IEnhancedReturn get() { return null; }\n" + >+ "}\n" + >+ "interface IBaseReturn {}\n" + >+ "interface IEnhancedReturn extends IBaseReturn {}" >+ }, >+ ""); >+} >+ > public static Class testClass() { > return Compliance_1_5.class; > } >Index: compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier.java,v >retrieving revision 1.87 >diff -u -r1.87 MethodVerifier.java >--- compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier.java 7 May 2007 18:42:35 -0000 1.87 >+++ compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier.java 4 Jun 2007 16:58:34 -0000 >@@ -239,17 +239,17 @@ > int[] overriddenInheritedMethods = length > 1 ? findOverriddenInheritedMethods(methods, length) : null; > if (overriddenInheritedMethods != null) { > // detected some overridden methods that can be ignored when checking return types >+ // but cannot ignore an overridden inherited method completely when it comes to checking for bridge methods > int index = 0; > MethodBinding[] closestMethods = new MethodBinding[length]; > for (int i = 0; i < length; i++) > if (overriddenInheritedMethods[i] == 0) > closestMethods[index++] = methods[i]; >- methods = closestMethods; >- length = index; >- } >- >- if (!checkInheritedReturnTypes(methods, length)) >+ if (!checkInheritedReturnTypes(closestMethods, index)) >+ return; >+ } else if (!checkInheritedReturnTypes(methods, length)) { > return; >+ } > > MethodBinding concreteMethod = null; > if (!type.isInterface()) { // ignore concrete methods for interfaces
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 190748
:
69926
|
69988
|
70141
|
70147