summaryrefslogtreecommitdiff
path: root/plugins/kotlin/idea/tests/testData/intentions/branched/safeAccessToIfThen/simplePropertyAsReceiver3.kt
blob: 715cc3694df61c67f9189e81d06b9d6bd3ee4f8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// AFTER-WARNING: Parameter 'args' is never used
// AFTER-WARNING: Safe call on a non-null receiver will have nullable type in future releases
// AFTER-WARNING: Unnecessary safe call on a non-null receiver of type B?
// AFTER-WARNING: Variable 'x' is never used
class B {
    val c = C()
}

class C {
    val d = "bc"
}

fun main(args: Array<String>) {
    val a: B? = B()
    val x = a?.c?.<caret>d
}