diff options
Diffstat (limited to 'test/files/run/typecheck/Macros_1.scala')
-rw-r--r-- | test/files/run/typecheck/Macros_1.scala | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/test/files/run/typecheck/Macros_1.scala b/test/files/run/typecheck/Macros_1.scala index 850a611ab1..ee1c8da763 100644 --- a/test/files/run/typecheck/Macros_1.scala +++ b/test/files/run/typecheck/Macros_1.scala @@ -1,16 +1,11 @@ -import scala.reflect.macros.Context +import scala.reflect.macros.whitebox._ import scala.language.experimental.macros object Macros { def impl(c: Context) = { import c.universe._ - 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(()))))))) - c.typeCheck(classDef) - c.Expr[Any](Literal(Constant(()))) + c.typecheck(q"class C") + q"()" } def foo: Any = macro impl |