summaryrefslogtreecommitdiff
path: root/test/files/run/t5334_2.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-02-06 11:37:35 -0800
committerPaul Phillips <paulp@improving.org>2012-02-06 11:49:38 -0800
commit7539c4ee51c25a684399cd5400bf0285e6508fe2 (patch)
tree94a9eb9b9519417d1924711f56638a4be02f4a2b /test/files/run/t5334_2.scala
parentf0dcb3c87fe9c3214af6abe4e8d2032a8d51295c (diff)
parent93c2d93f4e7aaffaac92bdf14714a6c3871718c9 (diff)
downloadscala-7539c4ee51c25a684399cd5400bf0285e6508fe2.tar.gz
scala-7539c4ee51c25a684399cd5400bf0285e6508fe2.tar.bz2
scala-7539c4ee51c25a684399cd5400bf0285e6508fe2.zip
Merge branch 'master' into topic/inline
Conflicts: src/compiler/scala/tools/nsc/Global.scala test/files/run/programmatic-main.check
Diffstat (limited to 'test/files/run/t5334_2.scala')
-rw-r--r--test/files/run/t5334_2.scala16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/files/run/t5334_2.scala b/test/files/run/t5334_2.scala
new file mode 100644
index 0000000000..26f0778400
--- /dev/null
+++ b/test/files/run/t5334_2.scala
@@ -0,0 +1,16 @@
+import scala.tools.nsc.reporters._
+import scala.tools.nsc.Settings
+import reflect.runtime.Mirror.ToolBox
+
+object Test extends App {
+ val code = scala.reflect.Code.lift{
+ class C { override def toString() = "C" }
+ List((new C, new C))
+ };
+
+ val reporter = new ConsoleReporter(new Settings)
+ val toolbox = new ToolBox(reporter)
+ val ttree = toolbox.typeCheck(code.tree)
+ println(ttree.tpe)
+ println(toolbox.runExpr(ttree))
+}