Files
kotlin-fork/idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/propertyWithProperty.kt
T
2017-12-26 18:39:47 +03:00

13 lines
244 B
Kotlin
Vendored

// PROBLEM: none
interface Foo
interface Bar : Foo {
val x: String
}
data class Data(val foo: Foo)
fun handle(data: Data) {
// Not available yet (possible in principle)
val bar = <caret>if (data.foo is Bar) data.foo.x else null
}