summaryrefslogtreecommitdiff
path: root/test/files/run/t5258a.scala
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2012-01-31 15:02:48 +0100
committerEugene Burmako <xeno.by@gmail.com>2012-02-01 23:43:32 +0100
commit610027b3c50c6a46b26bcfe71013cebc172c146b (patch)
tree6522f581316a4a6b94f004cf2bfbdf34cc481fb2 /test/files/run/t5258a.scala
parentfbd5efe49cf23b446762dfa5026e8bac82ab04fc (diff)
downloadscala-610027b3c50c6a46b26bcfe71013cebc172c146b.tar.gz
scala-610027b3c50c6a46b26bcfe71013cebc172c146b.tar.bz2
scala-610027b3c50c6a46b26bcfe71013cebc172c146b.zip
Hardens reification against rare kinds of Constants
Importers now correctly process constants that carry types and symbols. However, it is still impossible to reify classOf for a class/trait that is defined inside a quasiquote. Theoretically, this can be implemented, but will require attaching original trees to classOf constants, which needs much more effort.
Diffstat (limited to 'test/files/run/t5258a.scala')
-rw-r--r--test/files/run/t5258a.scala14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/files/run/t5258a.scala b/test/files/run/t5258a.scala
new file mode 100644
index 0000000000..deabb8310f
--- /dev/null
+++ b/test/files/run/t5258a.scala
@@ -0,0 +1,14 @@
+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{
+ println(classOf[Int])
+ };
+
+ val reporter = new ConsoleReporter(new Settings)
+ val toolbox = new ToolBox(reporter)
+ val ttree = toolbox.typeCheck(code.tree)
+ toolbox.runExpr(ttree)
+} \ No newline at end of file