Skip to content

Rewrite VarArg application taking scala.collection.Seq #47

Open
@MasseGuillaume

Description

@MasseGuillaume

seen in https://github.com/scalikejdbc/scalikejdbc/pull/887/files#diff-0b7a8f44eeac5b6ce7571b09b0bffe98L77

in 2.13

val a: scala.collection.Seq[Any] = Seq()
def f(x: Any*): Unit = ()
f(a: _*)

type mismatch;
[error]  found   : Seq[Any] (in scala.collection) 
[error]  required: Seq[Any] (in scala.collection.immutable) 
[error]   f(a: _*)
[error]     ^

compiles in 2.12 and 2.13:

val a: scala.collection.Seq[Any] = Seq()
def f(x: Any*): Unit = ()
f(a.toSeq: _*)

summary:

input:

f(a: _*)

output:

f(a.toSeq: _*)

Metadata

Metadata

Assignees

No one assigned

    Labels

    rewriteRelated to rewrite rules (not compat library code)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions