mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-11 15:53:46 +00:00
19 lines
275 B
Kotlin
19 lines
275 B
Kotlin
trait D {
|
|
fun foo(): String = ""
|
|
}
|
|
|
|
fun test(d: Any?) {
|
|
if (d !is D) return
|
|
|
|
class Local {
|
|
fun f() {
|
|
<!DEBUG_INFO_SMARTCAST!>d<!>.foo()
|
|
}
|
|
|
|
fun f1() = <!DEBUG_INFO_SMARTCAST!>d<!>.foo()
|
|
|
|
fun f2(): String = <!DEBUG_INFO_SMARTCAST!>d<!>.foo()
|
|
}
|
|
}
|
|
|