Files
kotlin-fork/compiler/testData/codegen/box/extensionFunctions/kt1776.kt
T
2019-11-19 11:00:09 +03:00

21 lines
338 B
Kotlin
Vendored

// IGNORE_BACKEND_FIR: JVM_IR
interface Expr {
public fun ttFun() : Int = 12
}
class Num(val value : Int) : Expr
fun Expr.sometest() : Int {
if (this is Num) {
value
return value
}
return 0;
}
fun box() : String {
if (Num(11).sometest() != 11) return "fail ${Num(11).sometest()}"
return "OK"
}