NI: don't collect members if a receiver type is StubType to avoid creating error candidates instead of not crating them at all

^KT-37717 Fixed
This commit is contained in:
Victor Petukhov
2020-07-06 11:06:34 +03:00
parent 989e4293a3
commit eec3a4720c
11 changed files with 79 additions and 2 deletions
@@ -0,0 +1,15 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER -EXPERIMENTAL_IS_NOT_ENABLED
// WITH_RUNTIME
import kotlin.experimental.ExperimentalTypeInference
@OptIn(ExperimentalTypeInference::class)
fun <T> foo(x: T, @BuilderInference builder: T.() -> Unit): Unit = TODO()
class Bar<T>
fun test() {
foo(1) {
<!UNRESOLVED_REFERENCE!>dsgfsdg<!>
}
}
@@ -0,0 +1,15 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER -EXPERIMENTAL_IS_NOT_ENABLED
// WITH_RUNTIME
import kotlin.experimental.ExperimentalTypeInference
@OptIn(ExperimentalTypeInference::class)
fun <T> foo(x: T, @BuilderInference builder: T.() -> Unit): Unit = TODO()
class Bar<T>
fun test() {
foo(1) {
<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE, DEBUG_INFO_UNRESOLVED_WITH_TARGET, UNRESOLVED_REFERENCE!>dsgfsdg<!>
}
}
@@ -0,0 +1,11 @@
package
@kotlin.OptIn(markerClass = {kotlin.experimental.ExperimentalTypeInference::class}) public fun </*0*/ T> foo(/*0*/ x: T, /*1*/ @kotlin.BuilderInference builder: T.() -> kotlin.Unit): kotlin.Unit
public fun test(): kotlin.Unit
public final class Bar</*0*/ T> {
public constructor Bar</*0*/ T>()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}