Files
kotlin-fork/compiler/testData/diagnostics/tests/collectionLiterals/collectionLiteralsOutsideOfAnnotations.fir.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
414 B
Kotlin
Vendored

// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_PARAMETER
fun takeArray(array: Array<String>) {}
fun test() {
"foo bar".<!UNRESOLVED_REFERENCE!>split<!>([""])
<!UNRESOLVED_REFERENCE!>unresolved<!>([""])
takeArray([""])
val v = [""]
[""]
[1, 2, 3].size
}
fun baz(arg: Array<Int> = []) {
if (true) ["yes"] else {["no"]}
}
class Foo(
val v: Array<Int> = []
)