Files
kotlin-fork/compiler/testData/codegen/box/smartCasts/kt17725.kt
T
Dmitry Petrov d0c8af5621 Keep track of second receiver type in CallReceiver
#KT-17725 Fixed Target versions 1.1.5
2017-07-24 10:15:27 +03:00

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()