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 22919 Details for
Bug 99553
[1.5][compiler] Parameterized class nested statically inside another parameterized type causes compile errors when used in method signatures
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch for jdt/core
99553.txt (text/plain), 2.78 KB, created by
Philipe Mulet
on 2005-06-13 09:38:15 EDT
(
hide
)
Description:
Patch for jdt/core
Filename:
MIME Type:
Creator:
Philipe Mulet
Created:
2005-06-13 09:38:15 EDT
Size:
2.78 KB
patch
obsolete
>Index: compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedSingleTypeReference.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedSingleTypeReference.java,v >retrieving revision 1.23 >diff -u -r1.23 ParameterizedSingleTypeReference.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedSingleTypeReference.java 4 Jun 2005 13:03:22 -0000 1.23 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedSingleTypeReference.java 13 Jun 2005 13:37:09 -0000 >@@ -156,10 +156,16 @@ > } > > // if generic type X<T> is referred to as parameterized X<T>, then answer itself >- boolean allEqual = true; >- for (int i = 0; allEqual && i < argLength; i++) >- allEqual = typeVariables[i] == argTypes[i]; >- if (!allEqual) { >+ boolean isIdentical = this.resolvedType instanceof SourceTypeBinding; >+ if (isIdentical) { >+ for (int i = 0; i < argLength; i++) { >+ if (typeVariables[i] != argTypes[i]) { >+ isIdentical = false; >+ break; >+ } >+ } >+ } >+ if (!isIdentical) { > ParameterizedTypeBinding parameterizedType = scope.environment().createParameterizedType((ReferenceBinding)currentType.erasure(), argTypes, enclosingType); > // check argument type compatibility > if (checkBounds) // otherwise will do it in Scope.connectTypeVariables() or generic method resolution >Index: compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java,v >retrieving revision 1.227 >diff -u -r1.227 Scope.java >--- compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java 10 Jun 2005 08:41:20 -0000 1.227 >+++ compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java 13 Jun 2005 13:37:12 -0000 >@@ -177,7 +177,10 @@ > } > if (substitutedArguments != originalArguments || substitutedEnclosing != originalEnclosing) { > identicalVariables: { // if substituted with original variables, then answer the generic type itself >- if (substitutedEnclosing != originalEnclosing) break identicalVariables; >+ if (substitutedEnclosing != null) { >+ if (!(substitutedEnclosing instanceof SourceTypeBinding)) break identicalVariables; >+ if (substitutedEnclosing != originalEnclosing) break identicalVariables; >+ } > if (originalParameterizedType.type.isBinaryBinding()) break identicalVariables; // generic binary is never used as is, see 85262 > TypeVariableBinding[] originalVariables = originalParameterizedType.type.typeVariables(); > for (int i = 0, length = originalVariables.length; i < length; i++) {
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 99553
: 22919