Files
kotlin-fork/compiler/testData/codegen/box/smartCasts/kt17725.kt
T

10 lines
158 B
Kotlin
Vendored

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