Files
kotlin-fork/compiler/testData/diagnostics/tests/collectionLiterals/collectionLiteralsOutsideOfAnnotations.kt
T
Denis.Zharkov 2ecba6ac39 Remove WITH_NEW_INFERENCE directive from all tests
This directive anyway does not make test run twice with OI, and with NI
It only once run the test with specific settings (// LANGUAGE)
and ignores irrelevant (OI or NI tags)
2021-05-25 13:28:26 +03:00

22 lines
594 B
Kotlin
Vendored

// !LANGUAGE: +NewInference
// !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!>[]<!>
)