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 41150 Details for
Bug 141330
[1.5][compiler] Suspicious error message for type mismatch
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed patch
141130.txt (text/plain), 4.23 KB, created by
Philipe Mulet
on 2006-05-11 12:13:40 EDT
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Philipe Mulet
Created:
2006-05-11 12:13:40 EDT
Size:
4.23 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: compiler/org/eclipse/jdt/internal/compiler/lookup/ReferenceBinding.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ReferenceBinding.java,v >retrieving revision 1.101 >diff -u -r1.101 ReferenceBinding.java >--- compiler/org/eclipse/jdt/internal/compiler/lookup/ReferenceBinding.java 28 Apr 2006 14:53:28 -0000 1.101 >+++ compiler/org/eclipse/jdt/internal/compiler/lookup/ReferenceBinding.java 11 May 2006 16:15:54 -0000 >@@ -595,13 +595,13 @@ > public ReferenceBinding findSuperTypeErasingTo(int wellKnownErasureID, boolean erasureIsClass) { > > // do not allow type variables to match with erasures for free >- if (this.id == wellKnownErasureID || (!isTypeVariable() && erasure().id == wellKnownErasureID)) return this; >+ if (this.id == wellKnownErasureID || (!isTypeVariable() && !isIntersectionType() && erasure().id == wellKnownErasureID)) return this; > > ReferenceBinding currentType = this; > // iterate superclass to avoid recording interfaces if searched supertype is class > if (erasureIsClass) { > while ((currentType = currentType.superclass()) != null) { >- if (currentType.id == wellKnownErasureID || (!currentType.isTypeVariable() && currentType.erasure().id == wellKnownErasureID)) >+ if (currentType.id == wellKnownErasureID || (!currentType.isTypeVariable() && !currentType.isIntersectionType() && currentType.erasure().id == wellKnownErasureID)) > return currentType; > } > return null; >@@ -630,7 +630,7 @@ > > for (int i = 0; i < nextPosition; i++) { > currentType = interfacesToVisit[i]; >- if (currentType.id == wellKnownErasureID || (!currentType.isTypeVariable() && currentType.erasure().id == wellKnownErasureID)) >+ if (currentType.id == wellKnownErasureID || (!currentType.isTypeVariable() && !currentType.isIntersectionType() && currentType.erasure().id == wellKnownErasureID)) > return currentType; > > ReferenceBinding[] itsInterfaces = currentType.superInterfaces(); >Index: compiler/org/eclipse/jdt/internal/compiler/lookup/TypeBinding.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeBinding.java,v >retrieving revision 1.72 >diff -u -r1.72 TypeBinding.java >--- compiler/org/eclipse/jdt/internal/compiler/lookup/TypeBinding.java 28 Apr 2006 14:53:28 -0000 1.72 >+++ compiler/org/eclipse/jdt/internal/compiler/lookup/TypeBinding.java 11 May 2006 16:15:54 -0000 >@@ -187,14 +187,14 @@ > case Binding.GENERIC_TYPE : > case Binding.RAW_TYPE : > case Binding.WILDCARD_TYPE : >- // do not allow type variables to match with erasures for free >- if (!otherType.isTypeVariable()) otherType = otherType.erasure(); >- if (this == otherType || (!isTypeVariable() && erasure() == otherType)) return this; >+ // do not allow type variables/intersection types to match with erasures for free >+ if (!otherType.isTypeVariable() && !otherType.isIntersectionType()) otherType = otherType.erasure(); >+ if (this == otherType || (!isTypeVariable() && !isIntersectionType() && erasure() == otherType)) return this; > > ReferenceBinding currentType = (ReferenceBinding)this; > if (!otherType.isInterface()) { > while ((currentType = currentType.superclass()) != null) { >- if (currentType == otherType || (!currentType.isTypeVariable() && currentType.erasure() == otherType)) return currentType; >+ if (currentType == otherType || (!currentType.isTypeVariable() && !currentType.isIntersectionType() && currentType.erasure() == otherType)) return currentType; > } > return null; > } >@@ -222,7 +222,7 @@ > > for (int i = 0; i < nextPosition; i++) { > currentType = interfacesToVisit[i]; >- if (currentType == otherType || (!currentType.isTypeVariable() && currentType.erasure() == otherType)) >+ if (currentType == otherType || (!currentType.isTypeVariable() && !currentType.isIntersectionType() && currentType.erasure() == otherType)) > return currentType; > > ReferenceBinding[] itsInterfaces = currentType.superInterfaces();
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 141330
: 41150