Files
kotlin/compiler/testData/codegen/box/functions/recursiveCompareTo.kt
Andrey Breslav 93160431f9 Fix recusrive calls in infix and prefix form
The infamous invokeOperation() method removed
2013-11-29 12:52:58 +04:00

11 lines
177 B
Kotlin

class C
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"