summaryrefslogblamecommitdiff
path: root/test/files/neg/macro-blackbox-structural/Impls_Macros_1.scala
blob: a86a26d2c08c20526535898d393863617b171d0a (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13


                                         
                                                        








                       
                           
 
import scala.language.experimental.macros

object Macros {
  def impl(c: scala.reflect.macros.blackbox.Context) = {
    import c.universe._
    q"""
      trait Foo {
        def x = 2
      }
      new Foo {}
    """
  }

  def foo: Any = macro impl
}