A repeated parameter can accept a collection as the last parameter but will be considered a single object:
A repeated parameter can accept a collection - if you want it expanded, add :_*
A repeated parameter must be the last parameter and this will let you add as many extra parameters as needed.
A repeated parameter must be the last parameter and this will let you add as many extra parameters as needed.
Given:
def repeatedParameterMethod(x: Int, y: String, z: Any*) = { "%d %ss can give you %s".format(x, y, z.mkString(", ")) }
Resolve:
The parameterless execute method has been deprecated and will be removed in a future version of ScalaTest. Please invoke execute with empty parens instead: execute().
The trap method is no longer needed for demos in the REPL, which now abreviates stack traces, and will be removed in a future version of ScalaTest