I am guessing that, for compatibility reasons, the type of vararg parameters Any*
is Array[Any] - please correct this if I\'m wrong. However, this does not expl
No: actually, Any*
is actually almost identical to Seq[Any]
, not to Array[Any]
.
To disambiguate between the two, you can use the technique to add a dummy implicit parameter to make the signature different:
class Api(api_url: String, params: Seq[(String, String)]) {
def this(api_url: String, params: (String, String)*)(implicit d: DummyImplicit) =
this(api_url, params)
}