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 68431 Details for
Bug 188741
[1.5][compiler] Incorrect ambiguous method error with inherited raw type
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed patch
patch.txt (text/plain), 2.52 KB, created by
Kent Johnson
on 2007-05-23 15:34:47 EDT
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Kent Johnson
Created:
2007-05-23 15:34:47 EDT
Size:
2.52 KB
patch
obsolete
>Index: compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java,v >retrieving revision 1.308 >diff -u -r1.308 Scope.java >--- compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java 22 May 2007 15:42:37 -0000 1.308 >+++ compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java 23 May 2007 19:33:55 -0000 >@@ -2580,10 +2580,8 @@ > } > if (oneParam.isCompatibleWith(twoParam)) { > if (oneParam.leafComponentType().isRawType()) { >- if (oneParam.needsUncheckedConversion(twoParam)) >- return false; > // A#RAW is not more specific than a rawified A<T> >- if (oneParam == one.original().parameters[i] && twoParam != two.original().parameters[i]) >+ if (oneParam.needsUncheckedConversion(two.original().parameters[i])) > return false; > } > } else { >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.43 >diff -u -r1.43 AmbiguousMethodTest.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/AmbiguousMethodTest.java 15 May 2007 14:39:20 -0000 1.43 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/AmbiguousMethodTest.java 23 May 2007 19:33:56 -0000 >@@ -2002,4 +2002,38 @@ > }, > ""); > } >+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=188741 >+public void test058() { >+ this.runConformTest( >+ new String[] { >+ "X.java", >+ "public class X extends A {\n" + >+ " void x(G g) { System.out.print(1); }\n" + >+ " public static void main(String[] s) {\n" + >+ " H h = new H();\n" + >+ " new X().x(h);\n" + >+ " }\n" + >+ "}\n" + >+ "class A<T> {\n" + >+ " void x(T t) { System.out.print(2); }\n" + >+ "}\n" + >+ "class F<T> {}\n" + >+ "class G<T> extends F<T> {}\n" + >+ "class H<T> extends G<T> {}" >+ }, >+ "1"); >+} >+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=188741 >+public void test058a() { >+ this.runConformTest( >+ new String[] { >+ "X.java", >+ "public class X extends java.util.ArrayList {\n" + >+ " private static final long serialVersionUID = 1L;\n" + >+ " public void add(Comparable o) {}\n" + >+ " public void test() { add(\"hello\"); }\n" + >+ "}" >+ }, >+ ""); >+} > }
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 188741
: 68431