Files
kotlin-fork/compiler/fir/analysis-tests/testData/resolve/smartcasts/controlStructures/smartcastFromArgument.kt
T
2020-12-16 19:52:30 +03:00

13 lines
156 B
Kotlin
Vendored

// !DUMP_CFG
interface A {
fun foo()
}
fun takeA(a: A): Boolean = true
fun test(a: Any) {
if (takeA(a as? A ?: return)) {
a.foo()
}
}