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 87394 Details for
Bug 215843
[1.5][compiler] Compiler error with generic covariant
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed patch
215843.txt (text/plain), 3.09 KB, created by
Philipe Mulet
on 2008-01-21 08:33:09 EST
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Philipe Mulet
Created:
2008-01-21 08:33:09 EST
Size:
3.09 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >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.321 >diff -u -r1.321 Scope.java >--- compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java 7 Jan 2008 14:16:19 -0000 1.321 >+++ compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java 21 Jan 2008 13:32:39 -0000 >@@ -2596,11 +2596,6 @@ > TypeBinding oneParam = oneParams[i]; > TypeBinding twoParam = twoParams[i]; > if (oneParam == twoParam) { >- if (oneParam.leafComponentType().isRawType()) { >- // A#RAW is not more specific than a rawified A<T> >- if (oneParam == one.original().parameters[i] && oneParam != two.original().parameters[i]) >- return false; >- } > continue; > } > if (oneParam.isCompatibleWith(twoParam)) { >#P org.eclipse.jdt.core.tests.compiler >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.680 >diff -u -r1.680 GenericTypeTest.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java 17 Jan 2008 13:00:31 -0000 1.680 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java 21 Jan 2008 13:32:48 -0000 >@@ -41119,4 +41119,47 @@ > false, > null); > } >+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=215843 - variation >+public void test1232() { >+ this.runConformTest( >+ new String[] { >+ "X.java", >+ "public class X {\n" + >+ " public static void testCovariant(SubInterface sub1, SubInterface sub2) {\n" + >+ " SubInterface sub3 = sub1.and(sub2);\n" + >+ " }\n" + >+ " public interface SuperInterface<E> {\n" + >+ " public Number getNumber();\n" + >+ " public SuperInterface<E> and(SuperInterface<E> a);\n" + >+ " }\n" + >+ " public interface SubInterface extends SuperInterface {\n" + >+ " public Integer getNumber();\n" + >+ " public SubInterface and(SuperInterface s);\n" + >+ " }\n" + >+ "}\n", >+ }, >+ ""); >+ >+} >+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=215843 - variation >+public void test1233() { >+ this.runConformTest( >+ new String[] { >+ "X.java", >+ "public class X {\n" + >+ " public static void testCovariant(SubInterface<String> sub1, SubInterface<String> sub2) {\n" + >+ " SubInterface<String> sub3 = sub1.and(sub2);\n" + >+ " }\n" + >+ " public interface SuperInterface<E> {\n" + >+ " public Number getNumber();\n" + >+ " public SuperInterface<E> and(SuperInterface<E> a);\n" + >+ " }\n" + >+ " public interface SubInterface<F> extends SuperInterface<F> {\n" + >+ " public Integer getNumber();\n" + >+ " public SubInterface<F> and(SuperInterface<F> s);\n" + >+ " }\n" + >+ "}\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 215843
:
87394
|
87506