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 70141 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]
Updated patch
patch.txt (text/plain), 2.77 KB, created by
Kent Johnson
on 2007-06-05 10:32:25 EDT
(
hide
)
Description:
Updated patch
Filename:
MIME Type:
Creator:
Kent Johnson
Created:
2007-06-05 10:32:25 EDT
Size:
2.77 KB
patch
obsolete
>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 5 Jun 2007 14:31:15 -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 >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.128 >diff -u -r1.128 MethodVerifyTest.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java 21 May 2007 12:00:29 -0000 1.128 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java 5 Jun 2007 14:31:16 -0000 >@@ -7808,4 +7808,27 @@ > "" > ); > } >+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=190748 >+public void test143() { >+ 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 {}" >+ }, >+ ""); >+} > }
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