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 23158 Details for
Bug 100128
[1.5][compiler] StackOverflow compiling GNU Classpath generics branch
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Apply patch on CaptureBinding
100128.txt (text/plain), 3.31 KB, created by
Philipe Mulet
on 2005-06-15 07:07:02 EDT
(
hide
)
Description:
Apply patch on CaptureBinding
Filename:
MIME Type:
Creator:
Philipe Mulet
Created:
2005-06-15 07:07:02 EDT
Size:
3.31 KB
patch
obsolete
>Index: CaptureBinding.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CaptureBinding.java,v >retrieving revision 1.8 >diff -u -r1.8 CaptureBinding.java >--- CaptureBinding.java 9 Jun 2005 11:44:54 -0000 1.8 >+++ CaptureBinding.java 15 Jun 2005 11:06:34 -0000 >@@ -115,10 +115,18 @@ > public void initializeBounds(ParameterizedTypeBinding capturedParameterizedType) { > TypeVariableBinding wildcardVariable = wildcard.typeVariable(); > ReferenceBinding originalVariableSuperclass = wildcardVariable.superclass; >+ ReferenceBinding substitutedVariableSuperclass = (ReferenceBinding) Scope.substitute(capturedParameterizedType, originalVariableSuperclass); > // prevent cyclic capture: given X<T>, capture(X<? extends T> could yield a circular type >- ReferenceBinding substitutedVariableSuperclass = originalVariableSuperclass.isTypeVariable() ? originalVariableSuperclass : (ReferenceBinding) Scope.substitute(capturedParameterizedType, originalVariableSuperclass); >- ReferenceBinding[] substitutedVariableInterfaces = Scope.substitute(capturedParameterizedType, wildcardVariable.superInterfaces()); >+ if (substitutedVariableSuperclass == this) substitutedVariableSuperclass = originalVariableSuperclass; > >+ ReferenceBinding[] originalVariableInterfaces = wildcardVariable.superInterfaces(); >+ ReferenceBinding[] substitutedVariableInterfaces = Scope.substitute(capturedParameterizedType, originalVariableInterfaces); >+ if (substitutedVariableInterfaces != originalVariableInterfaces) { >+ // prevent cyclic capture: given X<T>, capture(X<? extends T> could yield a circular type >+ for (int i = 0, length = substitutedVariableInterfaces.length; i < length; i++) { >+ if (substitutedVariableInterfaces[i] == this) substitutedVariableInterfaces[i] = originalVariableInterfaces[i]; >+ } >+ } > switch (wildcard.boundKind) { > case Wildcard.EXTENDS : > if (wildcard.bound.isInterface()) { >@@ -138,6 +146,8 @@ > this.superInterfaces = substitutedVariableInterfaces; > } > TypeBinding substitutedWildcardBound = Scope.substitute(capturedParameterizedType, wildcard.bound); >+ // prevent cyclic capture: given X<T>, capture(X<? extends T> could yield a circular type >+ if (substitutedWildcardBound == this) substitutedWildcardBound = wildcard.bound; > this.firstBound = substitutedWildcardBound; > if ((substitutedWildcardBound.tagBits & HasTypeVariable) == 0) > this.tagBits &= ~HasTypeVariable; >@@ -149,8 +159,10 @@ > break; > case Wildcard.SUPER : > this.superclass = substitutedVariableSuperclass; >- // prevent cyclic capture: given X<T>, capture(X<? super T> could yield a circular type >- substitutedWildcardBound = wildcard.bound.isTypeVariable() ? wildcard.bound : Scope.substitute(capturedParameterizedType, wildcard.bound); >+ substitutedWildcardBound = Scope.substitute(capturedParameterizedType, wildcard.bound); >+ // prevent cyclic capture: given X<T>, capture(X<? extends T> could yield a circular type >+ if (substitutedWildcardBound == this) substitutedWildcardBound = wildcard.bound; >+ > if (wildcardVariable.firstBound == this.superclass > || substitutedWildcardBound == this.superclass) { > this.firstBound = this.superclass;
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 100128
: 23158