Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
def list = [1,2,3,4]
list[0..<-1]
For me the first interpretation in mind would be: get everything but last from the list.
But range 0..<-1 == 0..0 and we get just one element.
I think ..< ranges should not implicitly be converted to .. ranges, but should hold original edges and the type.
In this case in getting sublist operation -1 first become size()-1 == 3 and then depending on type become 2 or just stay 3