-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Labels
Milestone
Description
problem
Scala varargs compile down to a method that takes a Seq as an argument, but since Seq.apply itself takes varargs as an argument, we have a circularity problem.
I think adding the scala.annotation.varargs annotation will make this much less painful in future versions of scala.
what I tried to do
Note this is in java
Seq$.MODULE$.apply("sup");This fails with:
[error] REDACTED:1: method apply in class scala.collection.generic.GenericCompanion<CC> cannot be applied to given types;
[error] required: scala.collection.Seq<A>
[error] found: java.lang.String
[error] reason: cannot infer type-variable(s) A
[error] (argument mismatch; java.lang.String cannot be converted to scala.collection.Seq<A>)
how this makes me feel
😭
version information etc
This is in java 8 with scala 2.11, but I believe it fails with scala 2.12 too.
Reactions are currently unavailable