summaryrefslogtreecommitdiff
path: root/test/files/run/t7064-old-style-supercalls.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run/t7064-old-style-supercalls.scala')
-rw-r--r--test/files/run/t7064-old-style-supercalls.scala48
1 files changed, 0 insertions, 48 deletions
diff --git a/test/files/run/t7064-old-style-supercalls.scala b/test/files/run/t7064-old-style-supercalls.scala
deleted file mode 100644
index cffa7b1888..0000000000
--- a/test/files/run/t7064-old-style-supercalls.scala
+++ /dev/null
@@ -1,48 +0,0 @@
-import scala.reflect.runtime.universe._
-import Flag._
-import definitions._
-import scala.reflect.runtime.{currentMirror => cm}
-import scala.tools.reflect.ToolBox
-import scala.tools.reflect.Eval
-
-object Test extends App {
- val PARAMACCESSOR = (1L << 29).asInstanceOf[FlagSet]
-
- // these trees can be acquired by running the following incantation:
- // echo 'class C(val x: Int); class D extends C(2)' > foo.scala
- // ./scalac -Xprint:parser -Yshow-trees-stringified -Yshow-trees-compact foo.scala
-
- val c = ClassDef(
- Modifiers(), newTypeName("C"), List(),
- Template(
- List(Select(Ident(ScalaPackage), newTypeName("AnyRef"))),
- emptyValDef,
- List(
- ValDef(Modifiers(PARAMACCESSOR), newTermName("x"), Ident(newTypeName("Int")), EmptyTree),
- DefDef(
- Modifiers(),
- nme.CONSTRUCTOR,
- List(),
- List(List(ValDef(Modifiers(PARAM | PARAMACCESSOR), newTermName("x"), Ident(newTypeName("Int")), EmptyTree))),
- TypeTree(),
- Block(
- List(Apply(Select(Super(This(tpnme.EMPTY), tpnme.EMPTY), nme.CONSTRUCTOR), List())),
- Literal(Constant(())))))))
- val d = ClassDef(
- Modifiers(), newTypeName("D"), List(),
- Template(
- List(Ident(newTypeName("C"))),
- 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(2))))),
- Literal(Constant(())))))))
- val result = Select(Apply(Select(New(Ident(newTypeName("D"))), nme.CONSTRUCTOR), List()), newTermName("x"))
- println(cm.mkToolBox().eval(Block(List(c, d), result)))
-} \ No newline at end of file