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

11 lines
188 B
Kotlin
Vendored

// IGNORE_BACKEND_FIR: JVM_IR
class Bob {
fun Bob.bar() = "OK"
}
fun Any.foo() = when(this) {
is Bob -> bar()
else -> throw AssertionError()
}
fun box(): String = Bob().foo()