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 78347 Details for
Bug 203318
[1.5][compiler] Improper capture of wildcard with lesser bound than parameter
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed patch
203318.txt (text/plain), 2.22 KB, created by
Philipe Mulet
on 2007-09-13 13:07:57 EDT
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Philipe Mulet
Created:
2007-09-13 13:07:57 EDT
Size:
2.22 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: compiler/org/eclipse/jdt/internal/compiler/lookup/CaptureBinding.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CaptureBinding.java,v >retrieving revision 1.19 >diff -u -r1.19 CaptureBinding.java >--- compiler/org/eclipse/jdt/internal/compiler/lookup/CaptureBinding.java 6 Jul 2006 11:20:36 -0000 1.19 >+++ compiler/org/eclipse/jdt/internal/compiler/lookup/CaptureBinding.java 13 Sep 2007 17:07:19 -0000 >@@ -101,7 +101,8 @@ > switch (wildcard.boundKind) { > case Wildcard.EXTENDS : > // still need to capture bound supertype as well so as not to expose wildcards to the outside (111208) >- TypeBinding substitutedWildcardBound = originalWildcardBound.capture(scope, this.position); >+ TypeBinding capturedWildcardBound = originalWildcardBound.capture(scope, this.position); >+ TypeBinding substitutedWildcardBound = Scope.substitute(capturedParameterizedType, capturedWildcardBound); > if (wildcard.bound.isInterface()) { > this.superclass = substitutedVariableSuperclass; > // merge wildcard bound into variable superinterfaces using glb >@@ -114,8 +115,16 @@ > this.superInterfaces = Scope.greaterLowerBound(substitutedVariableInterfaces); > } > } else { >- // per construction the wildcard bound is a subtype of variable superclass >- this.superclass = wildcard.bound.isArrayType() ? substitutedVariableSuperclass : (ReferenceBinding) substitutedWildcardBound; >+ // the wildcard bound should be a subtype of variable superclass >+ // it may occur that the bound is less specific, then consider glb (202404) >+ if (substitutedWildcardBound.isArrayType() || substitutedWildcardBound == this) { >+ this.superclass = substitutedVariableSuperclass; >+ } else { >+ this.superclass = (ReferenceBinding) substitutedWildcardBound; >+ if (this.superclass.isSuperclassOf(substitutedVariableSuperclass)) { >+ this.superclass = substitutedVariableSuperclass; >+ } >+ } > this.superInterfaces = substitutedVariableInterfaces; > } > this.firstBound = substitutedWildcardBound;
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 203318
: 78347