Files
kotlin-fork/backend.native/tests/external/codegen/box/functions/recursiveCompareTo.kt
T
2017-03-13 15:31:46 +03:00

11 lines
186 B
Kotlin

class C
operator fun C.compareTo(o: C) : Int {
if (this == o) return 0
if (o >= o) {
return 1
}
return -1
}
fun box() : String = if (C() > C()) "OK" else "FAIL"