summaryrefslogtreecommitdiff
path: root/test/files/run/repl-term-macros.scala
blob: f826259be9d1775a13eff9fc81ba403122ee8f5d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import scala.tools.partest.ReplTest

object Test extends ReplTest {
  def code = """
  import scala.reflect.macros.Context
import language.experimental.macros

def impl1(c: Context) = c.literalUnit
def foo1 = macro impl1
foo1

def impl2(c: Context)() = c.literalUnit
def foo2() = macro impl2
foo2()

def impl3(c: Context)(x: c.Expr[Int])(y: c.Expr[Int]) = c.literalUnit
def foo3(x: Int)(y: Int) = macro impl3
foo3(2)(3)
  """
}