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

21 lines
373 B
Kotlin
Vendored

// IGNORE_BACKEND_FIR: JVM_IR
// SKIP_JDK6
// TARGET_BACKEND: JVM
// FILE: Test.kt
open class KFoo {
fun foo(): String {
if (this is KFooBar) return bar
throw AssertionError()
}
}
class KFooBar : KFoo(), JBar
fun box(): String = KFooBar().foo()
// FILE: JBar.java
public interface JBar {
default String getBar() {
return "OK";
}
}