Files
kotlin-fork/compiler/testData/codegen/box/increment/postfixIncrementOnClass.kt
T
2018-06-09 19:15:38 +03:00

14 lines
293 B
Kotlin
Vendored

// IGNORE_BACKEND: JS_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"
}