diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2014-03-25 11:25:49 +0100 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2014-03-25 11:25:49 +0100 |
commit | 2af68eec522c97af14b8fad372fc3c0addf7d604 (patch) | |
tree | b2cde03aa63842ddf7875f12e599cb4d4dd23527 /test/files/run/typecheck/Test_2.scala | |
parent | 876590b2be42a77fc23e5c57fc155d5772265be7 (diff) | |
parent | 3314d76cebc6e27ba4d4ca75cc64fe67fcb90fb6 (diff) | |
download | scala-2af68eec522c97af14b8fad372fc3c0addf7d604.tar.gz scala-2af68eec522c97af14b8fad372fc3c0addf7d604.tar.bz2 scala-2af68eec522c97af14b8fad372fc3c0addf7d604.zip |
Merge pull request #3551 from xeno-by/topic/typecheck-member-def
[nomaster] backports 609047ba37
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 |