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 100733 Details for
Bug 232558
[compiler] += is not allowed between Object and String
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix
patch_232558.txt (text/plain), 1.68 KB, created by
Olivier Thomann
on 2008-05-16 16:35:32 EDT
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2008-05-16 16:35:32 EDT
Size:
1.68 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: compiler/org/eclipse/jdt/internal/compiler/ast/CompoundAssignment.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CompoundAssignment.java,v >retrieving revision 1.54 >diff -u -r1.54 CompoundAssignment.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/CompoundAssignment.java 28 Mar 2006 20:29:56 -0000 1.54 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/CompoundAssignment.java 16 May 2008 20:31:30 -0000 >@@ -152,18 +152,10 @@ > scope.problemReporter().invalidOperator(this, lhsType, expressionType); > return null; > } >- if (operator == PLUS){ >- if(lhsID == T_JavaLangObject) { >- // <Object> += <String> is illegal (39248) >- scope.problemReporter().invalidOperator(this, lhsType, expressionType); >- return null; >- } else { >- // <int | boolean> += <String> is illegal >- if ((lhsType.isNumericType() || lhsID == T_boolean) && !expressionType.isNumericType()){ >- scope.problemReporter().invalidOperator(this, lhsType, expressionType); >- return null; >- } >- } >+ if (operator == PLUS && ((lhsType.isNumericType() || lhsID == T_boolean) && !expressionType.isNumericType())) { >+ // <int | boolean> += <String> is illegal >+ scope.problemReporter().invalidOperator(this, lhsType, expressionType); >+ return null; > } > this.lhs.computeConversion(scope, TypeBinding.wellKnownType(scope, (result >>> 16) & 0x0000F), originalLhsType); > this.expression.computeConversion(scope, TypeBinding.wellKnownType(scope, (result >>> 8) & 0x0000F), originalExpressionType);
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 232558
:
100733
|
100734
|
117602