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
scala> (0 to Int.MaxValue).lastElement
res35:Int=-2
scala> (0 to Int.MaxValue).terminalElement
res36:Int=-1
scala> (0 to Int.MaxValue).numRangeElements
res37:Int=-1
This mess is caused by no documentation (especially not about how possibly invalid inputs are treated), unhandled numeric overflows and made worse by making these things public.
The only reason why we don't check our inputs immediately is to allow by to work. That means every other method needs to enforce our invariants.
I assume the methods above are not the only ones which don't do this.
The text was updated successfully, but these errors were encountered:
This mess is caused by no documentation (especially not about how possibly invalid inputs are treated), unhandled numeric overflows and made worse by making these things public.
The only reason why we don't check our inputs immediately is to allow
by
to work. That means every other method needs to enforce our invariants.I assume the methods above are not the only ones which don't do this.
The text was updated successfully, but these errors were encountered: