blob: 786a3f45f2d33943a96c20b9c34107d89613cf49 (
plain) (
tree)
|
|
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
}
|