154e53c701
It's reported on receivers in extension function calls with stub type, as such calls can shadow members of finalized stub types causing change of resolve when corresponding type argument specified explicitly It works by checking extension receiver during call resolution parts run That way we can easily detect if we found an extension applicable to stub receiver and report call diagnostic for it KT-53739
22 lines
337 B
Kotlin
Vendored
22 lines
337 B
Kotlin
Vendored
// WITH_STDLIB
|
|
// FIR_DUMP
|
|
// SKIP_TXT
|
|
|
|
fun Any?.test() {}
|
|
|
|
class Bar {
|
|
fun test() {}
|
|
}
|
|
|
|
fun main() {
|
|
|
|
buildList {
|
|
add(Bar())
|
|
<!BUILDER_INFERENCE_STUB_RECEIVER!>this.get(0)<!>.test() // resolved to Any?.test
|
|
}
|
|
buildList<Bar> {
|
|
add(Bar())
|
|
this.get(0).test() // resolved to Bar.test
|
|
}
|
|
}
|