blob: 376d85ba6732e948687bb44925a28bfb81bea7b2 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
|
import scala.reflect.macros.blackbox.Context
object Macros {
def impl(c:Context): c.Expr[Any] = {
import c.universe._
val selfTree = This(c.enclosingImpl.symbol.asModule.moduleClass)
c.Expr[AnyRef](selfTree)
}
def foo: Any = macro impl
}
|