Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Blocker
-
Resolution: Fixed
-
Affects Version/s: 1.1-rc-2
-
Fix Version/s: 1.1-rc-3
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
Hi,
When I statically define an int then this works as expected:
int anInt1 = 100 / 3
println anInt1 + " " + anInt1.getClass()
result: 33 class java.lang.Integer
But using the ternary operator the cast to Integer doesn't seem to be happening:
boolean b = false
int anInt2 = b ? 100 : 100 / 3
println anInt2 + " " + anInt2.getClass()
result: 33.3333333333 class java.math.BigDecimal
Regards,
Peter
I think this is a candidate for a blocker unless we can explain why it is occuring.