Files
kotlin-fork/compiler/fir/analysis-tests/testData/resolve/smartcasts/boundSmartcasts/functionCallBound.kt
T
2020-03-19 09:51:01 +03:00

19 lines
258 B
Kotlin
Vendored

// !DUMP_CFG
open class Base
class Sub(val data: Base): Base()
fun Sub.isOk() = true
fun check(base: Base): Base =
when {
(base as? Sub)?.isOk() == true -> {
base.data
}
else -> {
base
}
}