Files
kotlin-fork/compiler/testData/diagnostics/tests/Varargs.kt
T
2015-04-29 14:07:04 +02:00

17 lines
491 B
Kotlin
Vendored

fun v(<!UNUSED_PARAMETER!>x<!> : Int, <!UNUSED_PARAMETER!>y<!> : String, vararg <!UNUSED_PARAMETER!>f<!> : Long) {}
fun v1(vararg <!UNUSED_PARAMETER!>f<!> : (Int) -> Unit) {}
fun test() {
v(1, "")
v(1, "", 1)
v(1, "", 1, 1, 1)
v(1, "", 1, 1, 1)
v1()
v1({})
v1({}, {})
v1({}, <!CONSTANT_EXPECTED_TYPE_MISMATCH!>1<!>, {})
v1({}, {}, {<!UNUSED_EXPRESSION!>it<!>})
v1({}) <!VARARG_OUTSIDE_PARENTHESES!>{}<!>
v1 <!VARARG_OUTSIDE_PARENTHESES!>{}<!>
}