Files
kotlin-fork/compiler/testData/codegen/box/increment/postfixIncrementOnClass.kt
T
2020-01-22 14:49:23 +03:00

15 lines
299 B
Kotlin
Vendored

// IGNORE_BACKEND_FIR: JVM_IR
interface Base
class Derived: Base
class Another: Base
operator fun Base.inc(): Derived { return Derived() }
public fun box() : String {
var i : Base
i = Another()
val j = i++
return if (j is Another && i is Derived) "OK" else "fail j = $j i = $i"
}