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 127023 Details for
Bug 266421
[1.5][compiler] code compiles correctly in 3.4.1 but gives compilation errors in 3.5M5
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed patch and testcase
patch.txt (text/plain), 2.66 KB, created by
Kent Johnson
on 2009-02-27 11:42:57 EST
(
hide
)
Description:
Proposed patch and testcase
Filename:
MIME Type:
Creator:
Kent Johnson
Created:
2009-02-27 11:42:57 EST
Size:
2.66 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: compiler/org/eclipse/jdt/internal/compiler/lookup/TypeVariableBinding.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeVariableBinding.java,v >retrieving revision 1.71 >diff -u -r1.71 TypeVariableBinding.java >--- compiler/org/eclipse/jdt/internal/compiler/lookup/TypeVariableBinding.java 23 Jan 2009 19:50:22 -0000 1.71 >+++ compiler/org/eclipse/jdt/internal/compiler/lookup/TypeVariableBinding.java 27 Feb 2009 16:42:26 -0000 >@@ -291,8 +291,9 @@ > } > > boolean hasOnlyRawBounds() { >- if (this.superclass != null && !this.superclass.isRawType()) >- return false; >+ if (this.superclass != null && this.firstBound == this.superclass) >+ if (!this.superclass.isRawType()) >+ return false; > > if (this.superInterfaces != null) > for (int i = 0, l = this.superInterfaces.length; i < l; i++) >#P org.eclipse.jdt.core.tests.compiler >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.61 >diff -u -r1.61 AmbiguousMethodTest.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/AmbiguousMethodTest.java 20 Feb 2009 21:27:40 -0000 1.61 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/AmbiguousMethodTest.java 27 Feb 2009 16:42:27 -0000 >@@ -3037,4 +3037,33 @@ > "----------\n" > ); > } >+ >+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=266421 >+public void test075() { >+ this.runNegativeTest( >+ new String[] { >+ "C.java", >+ "abstract class A<T extends Comparable> {\n" + >+ " abstract int x(T val);\n" + >+ "}\n" + >+ "class B<T extends Comparable> extends A<T> {\n" + >+ " @Override int x(T val) { return 0; }\n" + >+ "}\n" + >+ "class C extends B<Double> {\n" + >+ " int test(Double val) { return x(val); }\n" + >+ "}" >+ }, >+ "----------\n" + >+ "1. WARNING in C.java (at line 1)\n" + >+ " abstract class A<T extends Comparable> {\n" + >+ " ^^^^^^^^^^\n" + >+ "Comparable is a raw type. References to generic type Comparable<T> should be parameterized\n" + >+ "----------\n" + >+ "2. WARNING in C.java (at line 4)\n" + >+ " class B<T extends Comparable> extends A<T> {\n" + >+ " ^^^^^^^^^^\n" + >+ "Comparable is a raw type. References to generic type Comparable<T> should be parameterized\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 266421
:
126952
| 127023