summaryrefslogtreecommitdiff
path: root/test/files/run/macro-expand-varargs-explicit-over-nonvarargs-bad/Macros_Test_2.scala
blob: 01fc9d4462e10e31fcfc0793c360a1f93c00d39e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
object Macros {
  def foo(xs: Int*) = macro Impls.foo
}

object Test extends App {
  import scala.reflect.mirror._
  val tree = Apply(Select(Ident("Macros"), newTermName("foo")), List(Typed(Apply(Ident(definitions.ListModule), List(Literal(Constant(1)), Literal(Constant(2)))), Ident(tpnme.WILDCARD_STAR))))
  try Expr(tree).eval
  catch { case ex: Throwable =>  println(ex.getMessage) }
}