blob: 0a3279e23e186c3eba8c00db4a6228d7c0e9fb0a (
plain) (
tree)
|
|
import scala.reflect.runtime.universe._
import scala.reflect.runtime.{currentMirror => cm}
import scala.tools.reflect.ToolBox
object Test extends App {
Macros.foo
val tb = cm.mkToolBox()
val classDef = ClassDef(
Modifiers(), newTypeName("C"), List(),
Template(
List(Select(Ident(newTermName("scala")), newTypeName("AnyRef"))), emptyValDef,
List(DefDef(Modifiers(), nme.CONSTRUCTOR, List(), List(List()), TypeTree(), Block(List(Apply(Select(Super(This(tpnme.EMPTY), tpnme.EMPTY), nme.CONSTRUCTOR), List())), Literal(Constant(())))))))
tb.typeCheck(classDef)
}
|