Files
kotlin-fork/compiler/testData/diagnostics/tests/collectionLiterals/collectionLiteralsOutsideOfAnnotations.kt
T
Denis.Zharkov d7399ed1cf K2: Avoid losing diagnostics for synthetic calls
Some of the changed tests may duplicate other existing diagnostics,
but that should not be reason not to report them at all.

There might be another job to be done to avoid diagnostic duplications
2023-02-15 08:13:41 +00:00

21 lines
566 B
Kotlin
Vendored

// !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!>[]<!>
)