Community
Participate
Working Groups
The compiler should compile the attached test case. Right now we fail with: ---------- 1. ERROR in c:\tests_sources\X.java (at line 4) short s = (short) _byte; ^^^^^^^^^^^^^ Cannot cast from Byte to short ---------- 2. ERROR in c:\tests_sources\X.java (at line 5) int i = (int) _byte; ^^^^^^^^^^^ Cannot cast from Byte to int ---------- 3. ERROR in c:\tests_sources\X.java (at line 6) long l = (long) _byte; ^^^^^^^^^^^^ Cannot cast from Byte to long ---------- 4. ERROR in c:\tests_sources\X.java (at line 7) float f = (float) _byte; ^^^^^^^^^^^^^ Cannot cast from Byte to float ---------- 5. ERROR in c:\tests_sources\X.java (at line 8) double d = (double) _byte; ^^^^^^^^^^^^^^ Cannot cast from Byte to double ---------- 6. ERROR in c:\tests_sources\X.java (at line 27) int i = (int) _character; ^^^^^^^^^^^^^^^^ Cannot cast from Character to int ---------- 7. ERROR in c:\tests_sources\X.java (at line 28) long l = (long) _character; ^^^^^^^^^^^^^^^^^ Cannot cast from Character to long ---------- 8. ERROR in c:\tests_sources\X.java (at line 29) float f = (float) _character; ^^^^^^^^^^^^^^^^^^ Cannot cast from Character to float ---------- 9. ERROR in c:\tests_sources\X.java (at line 30) double d = (double) _character; ^^^^^^^^^^^^^^^^^^^ Cannot cast from Character to double ---------- 10. ERROR in c:\tests_sources\X.java (at line 46) double d = (double) _float; ^^^^^^^^^^^^^^^ Cannot cast from Float to double ---------- 11. ERROR in c:\tests_sources\X.java (at line 53) long l = (long) _integer; ^^^^^^^^^^^^^^^ Cannot cast from Integer to long ---------- 12. ERROR in c:\tests_sources\X.java (at line 54) float f = (float) _integer; ^^^^^^^^^^^^^^^^ Cannot cast from Integer to float ---------- 13. ERROR in c:\tests_sources\X.java (at line 55) double d = (double) _integer; ^^^^^^^^^^^^^^^^^ Cannot cast from Integer to double ---------- 14. ERROR in c:\tests_sources\X.java (at line 68) int i = (int) _short; ^^^^^^^^^^^^ Cannot cast from Short to int ---------- 15. ERROR in c:\tests_sources\X.java (at line 69) long l = (long) _short; ^^^^^^^^^^^^^ Cannot cast from Short to long ---------- 16. ERROR in c:\tests_sources\X.java (at line 70) float f = (float) _short; ^^^^^^^^^^^^^^ Cannot cast from Short to float ---------- 17. ERROR in c:\tests_sources\X.java (at line 71) double d = (double) _short; ^^^^^^^^^^^^^^^ Cannot cast from Short to double ---------- 18. ERROR in c:\tests_sources\X.java (at line 87) float f = (float) _long; ^^^^^^^^^^^^^ Cannot cast from Long to float ---------- 19. ERROR in c:\tests_sources\X.java (at line 88) double d = (double) _long; ^^^^^^^^^^^^^^ Cannot cast from Long to double ---------- 19 problems (19 errors) The runtime result should be: OK.
Created attachment 17565 [details] Test case
Created attachment 17569 [details] Apply on HEAD of jdt.core project
All tests passed with this patch. The attached test case should be added as a regression test. Philippe, could you please review the patch?
Patch is good. Integrated. Added AutoboxingTest#test085 Fixed
Verified in I20050214