[patch] 6646584 Compound assignment with Byte, Short and Character

Dmytro Sheyko dmytro_sheyko at hotmail.com
Thu Jan 3 04:35:32 PST 2008


Hi, Attached patch that is to fix bug#6646584 Problem description:Javac forbids compound assignment if lhs is of type Byte, Short, Character. In other words following code should be compiled without any error:public class T { public void assignop_Byte(Byte v) {  v += 1; // should be ok } public void assignop_Short(Short v) {  v += 1; // should be ok } public void assignop_Character(Character v) {  v += 1; // should be ok } public void assignop_Integer_long(Integer v) {  v += 1L; // should be ok } public void assignop_Integer_double(Integer v) {  v += 1.0; // should be ok } public void assignop_byte(byte v) {  v += 1; // is ok } public void assignop_short(short v) {  v += 1; // is ok } public void assignop_char(char v) {  v += 1; // is ok } public void assignop_int_long(int v) {  v += 1L; // is ok } public void assignop_int_double(int v) {  v += 1.0; // is ok }}
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20080103/6d585eb5/attachment.html 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 6646584.diff
Url: http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20080103/6d585eb5/6646584.diff 


More information about the compiler-dev mailing list