New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
applyDynamic does not support passing a vararg parameter #9308
Comments
Imported From: https://issues.scala-lang.org/browse/SI-9308?orig=1 |
Anton Kulaga (antonkulaga) said: |
Any workaround? |
does anyone know if there is some real difficulty adding this, or whether the omission was just an oversight? |
I hit this issue with Scala.js running Scala 2.13.8. A simple code fails: import scala.scalajs.js
object Values {
def apply(s: (String, js.Any)) = js.Dynamic.literal(s:_*)
} The error is:
|
Hey Ondrej, why do you nice varargs splice here? It seems |
I want to encapsulate |
I see now what you meant, I am afraid misunderstood originally. You mean Is it documented somewhere? How can it work? Definition of |
I came across this scalac bug while attempting
js.Dynamic.literal(map.toSeq: _*) // Error: applyDynamic does not support passing a vararg parameter
It turned out that any call to applyDynamic will bug out the same way
scala-js/scala-js#1656 (comment)
The text was updated successfully, but these errors were encountered: