Summary: | Using the operator += with a String on the right side results in a compile error. | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Robert Baccus <rbaccus> |
Component: | Core | Assignee: | JDT-Core-Inbox <jdt-core-inbox> |
Status: | RESOLVED INVALID | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | ||
Version: | 2.1 | ||
Target Milestone: | 3.0 M1 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
Robert Baccus
2003-04-24 13:25:06 EDT
This is a bug in javac 1.4.1_02 which has been fixed in 1.4.2_b19. D:\temp>java -version java version "1.4.2-beta" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-beta-b19) Java HotSpot(TM) Client VM (build 1.4.2-beta-b19, mixed mode) D:\temp>javac X1.java X1.java:17: incompatible types found : java.lang.Object required: java.lang.String oa[i] += " | " + rowTotal + " |"; ^ X1.java:19: incompatible types found : java.lang.Object required: java.lang.String oa[i] += " " + intArray[j] + " "; ^ X1.java:21: incompatible types found : java.lang.Object required: java.lang.String oa[i] += "| " ^ 3 errors See http://developer.java.sun.com/developer/bugParade/bugs/4642850.html for further reference. Closed as INVALID. |