It would seem that case classs compiled in Scala 3 with varargs parameters can't be constructed in Scala 2, because the Scala 2 compiler thinks a Seq should be passed to the apply method instead of a dynamic number of arguments. If this is expected behavior, feel free to close this issue.
Reproduction steps
Scala 2 version: 2.13.16
Scala 3 version: 3.6.3
-
Clone this minimum reproducability case:
https://github.com/jadenPete/scala-varargs-bug-reproduction
-
Run sbt compile
-
Observe the following compilation error:
[error] .../scala-varargs-bug-reproduction/scala2/src/main/scala/Main.scala:2:63: too many arguments (found 3, expected 1) for method apply: (numbers: Seq[Int] @scala.annotation.internal.Repeated): NumberPrinter in object NumberPrinter
[error] def main(arguments: Array[String]): Unit = NumberPrinter(1, 2, 3).print()
Problem
I'd expect this to compile.