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

Rémi Forax forax at univ-mlv.fr
Thu Jan 3 07:54:12 PST 2008

Dmytro Sheyko a écrit :
> Well...
> Is there any reason to reject following statement
> B += 1;
> where 'B' is a variable of wrapper type 'java.lang.Byte' and accept in 
> the same time following statements
> b += 1;
> ++B;
> where 'b' a variable of primitive type 'int'? Of course, besides that 
> it is implied by JLS. I don't think that JLS was written so as 
> intentionally reject compound assignments with some wrapper types. And 
> current behavior seems inconsistent for me.
> If you like, this is RFE to JLS rather than bug in javac.
yes, for me it's a bug of the JLS3.


More information about the compiler-dev mailing list