rocketraman10/23/2023, 10:27 PM
) are comparing as
val a = LocalTime(21, 0)..LocalTime(9, 0) val b = LocalTime(22, 0)..LocalTime(9, 15) // true ?? println(a == b)
I guess in one way I can see this, as no value can fall between start and end, therefore the ranges are in effect empty and equal. But its still a bit surprising. Especially when one looks at the implementation of
val a = 5..1 val b = 6..1 // true println(a == b)
, its checking equality of
, which would cause that equality to be false.