blob: ecd9c5e8d5cf42fbf76d5f8c2d057ee815bc6fb5 (
plain) (
tree)
|
|
import scala.reflect.macros.whitebox.Context
import language.experimental.macros
object Macros {
def impl(c: Context) = {
import c.universe._
val name = TypeName(c.freshName())
q"class $name extends T; new $name"
}
def fresh: Any = macro impl
}
trait T
|