summaryrefslogtreecommitdiff
path: root/test/files/run/macro-impl-relaxed/Macros_1.scala
blob: 3cf5090ec8f93232bdf5e6c1b0a1ab3c2e0fef3e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import language.experimental.macros
import scala.reflect.macros.BlackboxContext

object Macros {
  def implUU(c: BlackboxContext)(x: c.Tree): c.Tree = x
  def implTU(c: BlackboxContext)(x: c.Expr[Int]): c.Tree = x.tree
  def implUT(c: BlackboxContext)(x: c.Tree): c.Expr[Int] = c.Expr[Int](x)
  def implTT(c: BlackboxContext)(x: c.Expr[Int]): c.Expr[Int] = x

  def fooUU(x: Int): Int = macro implUU
  def fooTU(x: Int): Int = macro implTU
  def fooUT(x: Int): Int = macro implUT
  def fooTT(x: Int): Int = macro implTT
}