[NI] Skip fake call for descriptor from object in builder-inference

This call have interesting rules for resolution, see
 `KtQualifiedExpression.elementChain` function and it's usages:
 resolution results for such call can be omitted and be replaced with
 some other information, while diagnostics will be reported from
 builder-inference.

 To mitigate this problem, we'll just skip this call from builder-inference
 as such calls can't have type parameters anyway

 #KT-32094 Fixed
This commit is contained in:
Mikhail Zarechenskiy
2019-06-20 16:27:13 +03:00
parent bebdf6fcef
commit fe0282809e
5 changed files with 18 additions and 9 deletions
@@ -1,6 +1,5 @@
// !USE_EXPERIMENTAL: kotlin.Experimental
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE
// !WITH_NEW_INFERENCE
// FILE: a.kt
@@ -36,7 +35,7 @@ fun <T> invBuilder(@BuilderInference block: Inv<T>.() -> Unit) {}
fun test() {
invBuilder {
val q = <!NI;INVISIBLE_MEMBER!>Queue<!>.empty()
val q = Queue.empty()
emit(42)
}
}