refined
refined copied to clipboard
scala.js: applyDynamic does not support passing a vararg parameter
In Scala.js (addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.22")
, when I try to do something like:
import eu.timepit.refined._
import eu.timepit.refined.api.Refined
import eu.timepit.refined.auto._
import eu.timepit.refined.numeric._
type WidthRange = Int Refined Interval.Closed[W.`200`.T, W.`1000`.T]
type HeightRange = Int Refined Interval.Closed[W.`200`.T, W.`1000`.T]
I get this error:
[error] /home/brandon/workspace/CCRS/web-client/src/main/scala/org/xsede/jobrunner/client/components/CCRSEditor.scala:39: applyDynamic does not support passing a vararg parameter
[error] type WidthRange = Int Refined Interval.Closed[W.`200`.T, W.`1000`.T]
[error] ^
[error] /home/brandon/workspace/CCRS/web-client/src/main/scala/org/xsede/jobrunner/client/components/CCRSEditor.scala:39: applyDynamic does not support passing a vararg parameter
[error] type WidthRange = Int Refined Interval.Closed[W.`200`.T, W.`1000`.T]
[error] ^
[error] /home/brandon/workspace/CCRS/web-client/src/main/scala/org/xsede/jobrunner/client/components/CCRSEditor.scala:40: applyDynamic does not support passing a vararg parameter
[error] type HeightRange = Int Refined Interval.Closed[W.`200`.T, W.`1000`.T]
[error] ^
[error] /home/brandon/workspace/CCRS/web-client/src/main/scala/org/xsede/jobrunner/client/components/CCRSEditor.scala:40: applyDynamic does not support passing a vararg parameter
[error] type HeightRange = Int Refined Interval.Closed[W.`200`.T, W.`1000`.T]
[error] ^
Possibly related upstream bug chain: https://github.com/scala-js/scala-js/issues/1656
Thanks for the report, @bbarker. It is strange that this does not happen in refined's own source which is compiled for and tested with Scala.js. Which sbt command produces these errors?
I tried reproducing this in https://github.com/fthomas/refined-sjs-example/commit/caa24a68dff36098092c5a043983667110cb0786 but this builds just fine.
It would be nice to reproduce these errors in refined-sjs-example.