Community
Participate
Working Groups
The following class doesn't cause a compiler error: public class TestCompiler { static String foo() {return "";} public TestCompiler() { super(); } public static void main(String[] args) { int jim =0; jim += foo(); } } I think it should, since it assigns the sum of 0 and "" to an int.
In build 20011218, the compiler reports an error: The operator += is undefined for the argument type(s) int, java.lang.String Duplicate of 1GKB28A: ITPJCORE:WIN2000 - Compiler accepts incorrect code, was resolved early in 2.0 stream. Closing.