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 59141 Details for
Bug 174434
[1.5][compiler] Parameterized constructor leads to Internal Errror
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix
patch_174434.txt (text/plain), 3.83 KB, created by
Olivier Thomann
on 2007-02-16 09:40:20 EST
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2007-02-16 09:40:20 EST
Size:
3.83 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedAllocationExpression.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedAllocationExpression.java,v >retrieving revision 1.79 >diff -u -r1.79 QualifiedAllocationExpression.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedAllocationExpression.java 28 Oct 2006 04:11:27 -0000 1.79 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedAllocationExpression.java 16 Feb 2007 14:39:23 -0000 >@@ -272,8 +272,14 @@ > int length = this.typeArguments.length; > this.genericTypeArguments = new TypeBinding[length]; > for (int i = 0; i < length; i++) { >- TypeBinding argType = this.typeArguments[i].resolveType(scope, true /* check bounds*/); >- if (argType == null) return null; // error already reported >+ TypeReference typeReference = this.typeArguments[i]; >+ TypeBinding argType = typeReference.resolveType(scope, true /* check bounds*/); >+ if (argType == null) { >+ if (typeReference instanceof Wildcard) { >+ scope.problemReporter().illegalUsageOfWildcard(typeReference); >+ } >+ return null; // error already reported >+ } > this.genericTypeArguments[i] = argType; > } > } >Index: compiler/org/eclipse/jdt/internal/compiler/ast/AllocationExpression.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AllocationExpression.java,v >retrieving revision 1.65 >diff -u -r1.65 AllocationExpression.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/AllocationExpression.java 28 Oct 2006 04:11:27 -0000 1.65 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/AllocationExpression.java 16 Feb 2007 14:39:23 -0000 >@@ -252,9 +252,13 @@ > boolean argHasError = false; // typeChecks all arguments > this.genericTypeArguments = new TypeBinding[length]; > for (int i = 0; i < length; i++) { >- if ((this.genericTypeArguments[i] = this.typeArguments[i].resolveType(scope, true /* check bounds*/)) == null) { >+ TypeReference typeReference = this.typeArguments[i]; >+ if ((this.genericTypeArguments[i] = typeReference.resolveType(scope, true /* check bounds*/)) == null) { > argHasError = true; > } >+ if (argHasError && typeReference instanceof Wildcard) { >+ scope.problemReporter().illegalUsageOfWildcard(typeReference); >+ } > } > if (argHasError) { > return null; >Index: compiler/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java,v >retrieving revision 1.55 >diff -u -r1.55 ExplicitConstructorCall.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java 28 Mar 2006 20:29:56 -0000 1.55 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java 16 Feb 2007 14:39:23 -0000 >@@ -294,9 +294,13 @@ > boolean argHasError = false; // typeChecks all arguments > this.genericTypeArguments = new TypeBinding[length]; > for (int i = 0; i < length; i++) { >- if ((this.genericTypeArguments[i] = this.typeArguments[i].resolveType(scope, true /* check bounds*/)) == null) { >+ TypeReference typeReference = this.typeArguments[i]; >+ if ((this.genericTypeArguments[i] = typeReference.resolveType(scope, true /* check bounds*/)) == null) { > argHasError = true; > } >+ if (argHasError && typeReference instanceof Wildcard) { >+ scope.problemReporter().illegalUsageOfWildcard(typeReference); >+ } > } > if (argHasError) { > return;
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 174434
: 59141