Skip to content

Instantly share code, notes, and snippets.

@kxbmap
Created February 23, 2014 09:35
Show Gist options
  • Save kxbmap/9169185 to your computer and use it in GitHub Desktop.
Save kxbmap/9169185 to your computer and use it in GitHub Desktop.
$ scalac sample.scala
sample.scala:14: error: applyDynamic does not support passing a vararg parameter
new Foo().foo(xs:_*).foobar(new Bar().bar)
^
one error found
import scala.language.dynamics
class Foo {
def foo(xs: Int*): Foo = ???
def foobar(b: Bar): Int = ???
}
class Bar extends Dynamic {
def selectDynamic(name: String): Bar = ???
}
object Sample extends App {
val xs = Seq(1, 2, 3)
new Foo().foo(xs:_*).foobar(new Bar().bar)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment