3de6289c6c
Call transformer previously ran completion of argument atoms only for non-error candidates. This led to missing diagnostics, i.e. from collection literal resolver. Now arguments of calls resolved to error descriptor are completed, with exception to not found provideDelegate calls. provideDelegate's subatoms are not completed after failure, because it is a part of delegate competion, which does not end with unresolved provideDelegate. Completing after provideDelegate failure removes constraint system from resolved arguments, which breaks resolve for get/setValue. ^KT-33592 Fixed
23 lines
617 B
Kotlin
Vendored
23 lines
617 B
Kotlin
Vendored
// !LANGUAGE: +NewInference
|
|
// !WITH_NEW_INFERENCE
|
|
// !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_PARAMETER
|
|
|
|
fun takeArray(array: Array<String>) {}
|
|
|
|
fun test() {
|
|
"foo bar".<!UNRESOLVED_REFERENCE!>split<!>(<!UNSUPPORTED!>[""]<!>)
|
|
<!UNRESOLVED_REFERENCE!>unresolved<!>(<!UNSUPPORTED!>[""]<!>)
|
|
takeArray(<!UNSUPPORTED!>[""]<!>)
|
|
val v = <!UNSUPPORTED!>[""]<!>
|
|
<!UNSUPPORTED!>[""]<!>
|
|
<!UNSUPPORTED!>[1, 2, 3]<!>.size
|
|
}
|
|
|
|
fun baz(arg: Array<Int> = <!UNSUPPORTED!>[]<!>) {
|
|
if (true) <!UNSUPPORTED!>["yes"]<!> else {<!UNSUPPORTED!>["no"]<!>}
|
|
}
|
|
|
|
class Foo(
|
|
val v: Array<Int> = <!UNSUPPORTED!>[]<!>
|
|
)
|