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
NonNegInt(1) // compilesNonNegInt(0) // compilesNonNegInt(-1) // compile-time errorNonNegInt.from(123)
// Either[String, NonNegInt] = Right(NonNegInt(123))NonNegInt.from(-123)
// Either[String, NonNegInt] = Left(Invalid value: -123. It must be a non-negative Int)NonNegInt.unsafeFrom(999)
// NonNegInt = NonNegInt(999)NonNegInt.unsafeFrom(-999)
// IllegalArgumentException(Invalid value: -999. It must be a non-negative Int) is thrown
The text was updated successfully, but these errors were encountered:
Summary
[core] Add
numeric.NonNegInt
Version
unreleased
Description
The text was updated successfully, but these errors were encountered: