Files
kotlin-fork/compiler/testData/diagnostics/tests/smartCasts/publicVal.kt
T
2014-10-01 18:52:52 +04:00

11 lines
169 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) <!SMARTCAST_IMPOSSIBLE!>p.foo<!> bar 11
}