-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Duplicate
-
Affects Version/s: 2.5.10
-
Fix Version/s: None
-
Component/s: groovy-runtime
-
Labels:None
this snippet worked in groovy 2.4 and did no longer in 2.5:
short maxAsShort = 5
int maxAsInt = 5
List<Byte> list = [1, 2, 3, 4, 5, 6]
assert list[0..<maxAsInt] == list[0..<maxAsShort ]
error message is:
Assertion failed:
assert list[0..<maxAsInt] == list[0..<maxAsShort]
| | | | | | |
| | 5 | | | 5
| [1, 2, 3, 4, 5]| | [1, 2, 3, 4, 5, 6]
[1, 2, 3, 4, 5, 6] | [1, 2, 3, 4, 5, 6]
falseat Script1.run(Script1.groovy:6)