summaryrefslogtreecommitdiff
path: root/test/files/run/macro-whitebox-structural/Impls_Macros_1.scala
blob: 1b975ca8509a57362403bdfe3fcca68c01665962 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import scala.reflect.macros.WhiteboxContext
import scala.language.experimental.macros

object Macros {
  def impl(c: WhiteboxContext) = {
    import c.universe._
    q"""
      trait Foo {
        def x = 2
      }
      new Foo {}
    """
  }

  def foo = macro impl
}