Stub support for varargs

This commit is contained in:
Andrey Breslav
2011-09-29 21:02:25 +04:00
parent 4c27b5caf8
commit 5c8b060a49
7 changed files with 30 additions and 7 deletions
@@ -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!>{}<!>
}