Stub support for varargs
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
fun foo(a : Int = 1, b : String = "abc") {
|
||||
}
|
||||
|
||||
fun bar(x : Int = "", y : Int = 1, z : String) {
|
||||
}
|
||||
|
||||
fun test() {
|
||||
foo()
|
||||
foo(2)
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
fun v(x : Int, y : String, vararg f : Long) {}
|
||||
fun v1(vararg f : fun (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!>{}<!>
|
||||
v1 <!VARARG_OUTSIDE_PARENTHESES!>{}<!>
|
||||
}
|
||||
Reference in New Issue
Block a user