f97cc0b62d
- Put extensionReceiver to candidate even if it's explicit (for sake of clarity) - Split CheckReceiver (dispatch part should only check nullability)
37 lines
571 B
Kotlin
Vendored
37 lines
571 B
Kotlin
Vendored
// !WITH_NEW_INFERENCE
|
|
// !DIAGNOSTICS: -UNUSED_EXPRESSION,-UNUSED_VARIABLE
|
|
|
|
fun <T : CharSequence?> T.bar1() {}
|
|
fun CharSequence?.bar2() {}
|
|
|
|
fun <T : CharSequence> T.bar3() {}
|
|
fun CharSequence.bar4() {}
|
|
|
|
fun <T : String?> T.foo() {
|
|
if (this != null) {
|
|
if (this != null) {}
|
|
|
|
length
|
|
this?.length
|
|
|
|
bar1()
|
|
bar2()
|
|
bar3()
|
|
bar4()
|
|
|
|
|
|
this?.bar1()
|
|
}
|
|
|
|
<!INAPPLICABLE_CANDIDATE!>length<!>
|
|
|
|
if (this is String) {
|
|
length
|
|
this?.length
|
|
|
|
bar1()
|
|
bar2()
|
|
bar3()
|
|
}
|
|
}
|