diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2012-01-31 15:02:48 +0100 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2012-02-01 23:43:32 +0100 |
commit | 610027b3c50c6a46b26bcfe71013cebc172c146b (patch) | |
tree | 6522f581316a4a6b94f004cf2bfbdf34cc481fb2 /test/pending/run/t5258b.scala | |
parent | fbd5efe49cf23b446762dfa5026e8bac82ab04fc (diff) | |
download | scala-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/pending/run/t5258b.scala')
-rw-r--r-- | test/pending/run/t5258b.scala | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/pending/run/t5258b.scala b/test/pending/run/t5258b.scala new file mode 100644 index 0000000000..70cb4a7f4e --- /dev/null +++ b/test/pending/run/t5258b.scala @@ -0,0 +1,15 @@ +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 + println(classOf[C]) + }; + + 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 |