diff options
Diffstat (limited to 'test/files/run/typecheck/Test_2.scala')
-rw-r--r-- | test/files/run/typecheck/Test_2.scala | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/files/run/typecheck/Test_2.scala b/test/files/run/typecheck/Test_2.scala new file mode 100644 index 0000000000..0a3279e23e --- /dev/null +++ b/test/files/run/typecheck/Test_2.scala @@ -0,0 +1,15 @@ +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) +}
\ No newline at end of file |