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 81570 Details for
Bug 207573
[1.5][compiler] Internal compiler error: ClassCastException / ArrayBinding
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Possible patch
207573.txt (text/plain), 3.98 KB, created by
Philipe Mulet
on 2007-10-30 07:24:10 EDT
(
hide
)
Description:
Possible patch
Filename:
MIME Type:
Creator:
Philipe Mulet
Created:
2007-10-30 07:24:10 EDT
Size:
3.98 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java,v >retrieving revision 1.318 >diff -u -r1.318 Scope.java >--- compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java 16 Oct 2007 10:24:16 -0000 1.318 >+++ compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java 30 Oct 2007 11:22:47 -0000 >@@ -200,12 +200,15 @@ > ReferenceBinding[] substitutedTypes = originalTypes; > for (int i = 0, length = originalTypes.length; i < length; i++) { > ReferenceBinding originalType = originalTypes[i]; >- ReferenceBinding substitutedParameter = (ReferenceBinding)substitute(substitution, originalType); >- if (substitutedParameter != originalType) { >+ TypeBinding substitutedType = substitute(substitution, originalType); >+ if (!(substitutedType instanceof ReferenceBinding)) { >+ return null; // impossible substitution >+ } >+ if (substitutedType != originalType) { > if (substitutedTypes == originalTypes) { > System.arraycopy(originalTypes, 0, substitutedTypes = new ReferenceBinding[length], 0, i); > } >- substitutedTypes[i] = substitutedParameter; >+ substitutedTypes[i] = (ReferenceBinding)substitutedType; > } else if (substitutedTypes != originalTypes) { > substitutedTypes[i] = originalType; > } >Index: compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedGenericMethodBinding.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedGenericMethodBinding.java,v >retrieving revision 1.59 >diff -u -r1.59 ParameterizedGenericMethodBinding.java >--- compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedGenericMethodBinding.java 12 Oct 2007 13:37:17 -0000 1.59 >+++ compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedGenericMethodBinding.java 30 Oct 2007 11:22:47 -0000 >@@ -284,6 +284,8 @@ > this.thrownExceptions = Scope.substitute(this, ignoreRawTypeSubstitution > ? originalMethod.thrownExceptions // no substitution if original was static > : Scope.substitute(rawType, originalMethod.thrownExceptions)); >+ // error case where exception type variable would have been substituted by a non-reference type (207573) >+ if (this.thrownExceptions == null) this.thrownExceptions = Binding.NO_EXCEPTIONS; > this.returnType = Scope.substitute(this, ignoreRawTypeSubstitution > ? originalMethod.returnType // no substitution if original was static > : Scope.substitute(rawType, originalMethod.returnType)); >@@ -306,6 +308,8 @@ > this.originalMethod = originalMethod; > this.parameters = Scope.substitute(this, originalMethod.parameters); > this.thrownExceptions = Scope.substitute(this, originalMethod.thrownExceptions); >+ // error case where exception type variable would have been substituted by a non-reference type (207573) >+ if (this.thrownExceptions == null) this.thrownExceptions = Binding.NO_EXCEPTIONS; > this.returnType = Scope.substitute(this, originalMethod.returnType); > this.wasInferred = true;// resulting from method invocation inferrence > } >@@ -432,6 +436,8 @@ > this.inferredReturnType = inferenceContext.hasExplicitExpectedType && this.returnType != oldReturnType; > this.parameters = Scope.substitute(this, this.parameters); > this.thrownExceptions = Scope.substitute(this, this.thrownExceptions); >+ // error case where exception type variable would have been substituted by a non-reference type (207573) >+ if (this.thrownExceptions == null) this.thrownExceptions = Binding.NO_EXCEPTIONS; > return this; > } >
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 207573
: 81570 |
81958