summaryrefslogtreecommitdiff
path: root/test/files/neg/macro-override-method-overrides-macro/Impls_1.scala
blob: f2d3f67ccca9bf0088ed1a3294b8d30a5975fd2c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import scala.reflect.macros.{BlackboxContext => Ctx}

object Impls {
  def impl(c: Ctx)(tag: String, x: c.Expr[_]) = {
    import c.{prefix => prefix}
    import c.universe._
    c.Expr[Unit](q"println($tag, ${prefix.toString}, $x)")
  }

  def fooBString(c: Ctx)(x: c.Expr[_]) = impl(c)("fooBString", x)
  def fooBInt(c: Ctx)(x: c.Expr[_]) = impl(c)("fooBInt", x)
  def fooDInt(c: Ctx)(x: c.Expr[_]) = impl(c)("fooDInt", x)
  def fooZString(c: Ctx)(x: c.Expr[_]) = impl(c)("fooZString", x)
}