Open amnaredo opened 3 years ago
To reproduce:
val arr = Js.Arr(Seq(Js.Str("a"), Js.Str("b")))
Expected: an Arr is created Actual: Compiler error:
Arr
[error] found : Seq[upickle.Js.Str] [error] required: upickle.Js.Value [error] val arr = Js.Arr(Seq(Js.Str("a"), Js.Str("b"))) [error] ^
This happens when using Scala.js and compiling in the set console with compile
compile
Js.Arr has a varargs apply and Scala should auto-convert varargs to Seq, but it incorrectly uses the other apply method.
Js.Arr
apply
Seq
ID: 84 Original Author: rabejens
Try Js.Arr(Seq(Js.Str("a"), Js.Str("b")):_*)?
Js.Arr(Seq(Js.Str("a"), Js.Str("b")):_*)
Original Author: lihaoyi
To reproduce:
Expected: an
Arr
is created Actual: Compiler error:This happens when using Scala.js and compiling in the set console with
compile
Js.Arr
has a varargsapply
and Scala should auto-convert varargs toSeq
, but it incorrectly uses the otherapply
method.ID: 84 Original Author: rabejens