You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Range returns empty Collection when using Int boundaries and large power of 2 as step size.
When converting to a list or vector, the collection is still allegedly empty, while converting to an Array yields presumably correct values.
The problem is at Range at the method terminalElement because it computes the element after the last element as an Int. Computing it as an Int causes an overflow, causing that start and end are equal.
This only happens on toList and on toVector because are the unique methods of Range that relies on foreach, the method that uses terminalElement.
Range returns empty Collection when using Int boundaries and large power of 2 as step size.
When converting to a list or vector, the collection is still allegedly empty, while converting to an Array yields presumably correct values.
The range is non-empty, presumably correct, when step size is smaller than 2^23:
The range is also presumably correct when not using a power of 2 as the step size:
The text was updated successfully, but these errors were encountered: