Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: X10 2.0.3
-
Fix Version/s: X10 2.0.4
-
Component/s: X10 Compiler: Common Optimizer
-
Labels:None
-
Number of attachments :
Description
Currently, ++x always gets desugared into x+=1, where 1 is an Int literal. The type of the literal should be the same as the type of x. Ditto for --x.
Actually, ++x gets desugared into x+=(1 as T), where T is the type of x. Granted, we should construct a literal of the right type and avoid the cast.