Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.8.1
-
Fix Version/s: 1.8.5, 2.0-beta-2
-
Component/s: class generator
-
Labels:None
-
Testcase included:yes
-
Number of attachments :
Description
I would expect that range literal follow the same type promotion rules as arithmetic operations, yet:
assert (1+10).class == Integer assert (1L+10).class == Long assert (1+10L).class == Long assert (1..10).every { it.class == Integer } assert (1L..10).every { it.class == Long } assert (1..10L).every { it.class == Integer } // <= weird