Files
kotlin-fork/compiler/testData/diagnostics/tests/smartCasts/publicVal.kt
T
Svetlana Isakova ab1d27dd6b don't use data flow info while checking for receiver
receiver with smart cast is checked separately
2013-12-11 19:53:50 +04:00

11 lines
168 B
Kotlin

public class A() {
public val foo: Int? = 1
}
fun Int.bar(i: Int) = i
fun test() {
val p = A()
if (p.foo is Int) <!AUTOCAST_IMPOSSIBLE!>p.foo<!> bar 11
}