Consider the code below:
private def test(some:String*){ } private def call () { val some = Array(\"asd\", \"zxc\") test(some) }
It p
Append :_* to the parameter in test like this
:_*
test
test(some:_*)
And it should work as you expect.
If you wonder what that magical :_* does, please refer to this question.
It is simple:
def test(some:String*){} def call () { val some = Array("asd", "zxc") test(some: _*) }