KT-4349 Make jet.Boolean implement Comparable
#KT-4349
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
fun checkLess(x: Boolean, y: Boolean) = when {
|
||||
x >= y -> "Fail $x >= $y"
|
||||
!(x < y) -> "Fail !($x < $y)"
|
||||
!(x <= y) -> "Fail !($x <= $y)"
|
||||
x > y -> "Fail $x > $y"
|
||||
x.compareTo(y) >= 0 -> "Fail $x.compareTo($y) >= 0"
|
||||
x compareTo y >= 0 -> "Fail $x compareTo $y >= 0"
|
||||
else -> "OK"
|
||||
}
|
||||
|
||||
fun box() = checkLess(false, true)
|
||||
Reference in New Issue
Block a user