scala / scala3

The Scala 3 compiler, also known as Dotty.
https://dotty.epfl.ch
Apache License 2.0
5.88k stars 1.06k forks source link

`compiletime.codeOf` generates uncompilable code #14495

Open Atry opened 2 years ago

Atry commented 2 years ago

Compiler version

3.1.1

Minimized code

println(compiletime.codeOf(Seq(1, 2)))

Output

Seq.apply[Int]([1,2 : Int]*)

Expectation

Seq.apply[Int](1,2)

or

Seq.apply[Int](Seq[Int](1,2): _*)
romanowski commented 2 years ago

Thank you @Atry for reporting and indeed, it seems that Tree printer for varargs should be fixed.