39450dd954
(therefore only once) while resolve use FAKE_FUNCTION_TYPE as type for function literal (which is a subtype/supertype for any function type)
18 lines
553 B
Kotlin
18 lines
553 B
Kotlin
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({}, <!ERROR_COMPILE_TIME_VALUE!>1<!>, {})
|
|
v1({}, {}, {it})
|
|
v1({}) <!VARARG_OUTSIDE_PARENTHESES, DANGLING_FUNCTION_LITERAL_ARGUMENT_SUSPECTED!>{}<!>
|
|
v1 <!VARARG_OUTSIDE_PARENTHESES, DANGLING_FUNCTION_LITERAL_ARGUMENT_SUSPECTED!>{}<!>
|
|
}
|