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 26297 Details for
Bug 104695
[1.5][compiler] Compiler allows instanceof with non-reifiable array type
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix
patch_104695.txt (text/plain), 1.55 KB, created by
Olivier Thomann
on 2005-08-19 10:23:49 EDT
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2005-08-19 10:23:49 EDT
Size:
1.55 KB
patch
obsolete
>Index: compiler/org/eclipse/jdt/internal/compiler/ast/InstanceOfExpression.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/InstanceOfExpression.java,v >retrieving revision 1.40 >diff -u -r1.40 InstanceOfExpression.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/InstanceOfExpression.java 7 Jul 2005 10:44:02 -0000 1.40 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/InstanceOfExpression.java 19 Aug 2005 14:22:43 -0000 >@@ -81,7 +81,17 @@ > if (expressionType == null || checkedType == null) > return null; > >- if (checkedType.isTypeVariable() || checkedType.isBoundParameterizedType() || checkedType.isGenericType()) { >+ if (checkedType.isArrayType()) { >+ TypeBinding leafType = checkedType.leafComponentType(); >+ if (leafType.isTypeVariable() || leafType.isBoundParameterizedType() || leafType.isGenericType()) { >+ scope.problemReporter().illegalInstanceOfGenericType(checkedType, this); >+ } else { >+ boolean isLegal = checkCastTypesCompatibility(scope, checkedType, expressionType, null); >+ if (!isLegal) { >+ scope.problemReporter().notCompatibleTypesError(this, expressionType, checkedType); >+ } >+ } >+ } else if (checkedType.isTypeVariable() || checkedType.isBoundParameterizedType() || checkedType.isGenericType()) { > scope.problemReporter().illegalInstanceOfGenericType(checkedType, this); > } else { > boolean isLegal = checkCastTypesCompatibility(scope, checkedType, expressionType, null);
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 104695
: 26297