summaryrefslogtreecommitdiff
path: root/test/files/run/reify_renamed_type_local_to_reifee.scala
diff options
context:
space:
mode:
authorAndriy Polishchuk <andriy.s.polishchuk@gmail.com>2012-12-06 11:59:05 +0200
committerEugene Burmako <xeno.by@gmail.com>2012-12-11 08:19:40 +0100
commit286abfc4cf6ed41c1622f4964aae321b0b9b6c6d (patch)
tree825c527163321df125d8291d63b896f1ccae81cd /test/files/run/reify_renamed_type_local_to_reifee.scala
parent0acb8a30c379f268e8a3e1340504530493a1a1dc (diff)
downloadscala-286abfc4cf6ed41c1622f4964aae321b0b9b6c6d.tar.gz
scala-286abfc4cf6ed41c1622f4964aae321b0b9b6c6d.tar.bz2
scala-286abfc4cf6ed41c1622f4964aae321b0b9b6c6d.zip
SI-5841 reification of renamed imports
Reification of renamed imports is done by catching Selects with name != their tree.symbol.name, replacing this name with tree.symbol.name, and then doing reifyProduct in case of renamed terms and reifyBoundType (inner) in case of renamed types.
Diffstat (limited to 'test/files/run/reify_renamed_type_local_to_reifee.scala')
-rw-r--r--test/files/run/reify_renamed_type_local_to_reifee.scala24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/files/run/reify_renamed_type_local_to_reifee.scala b/test/files/run/reify_renamed_type_local_to_reifee.scala
new file mode 100644
index 0000000000..ed1bad239e
--- /dev/null
+++ b/test/files/run/reify_renamed_type_local_to_reifee.scala
@@ -0,0 +1,24 @@
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
+
+object O {
+ type A = Unit
+}
+
+object Test extends App {
+ val expr = reify {
+ import O.{A => X}
+
+ val a: X = ()
+
+ object P {
+ type B = Unit
+ }
+
+ import P.{B => Y}
+
+ val b: Y = ()
+ }
+
+ println(expr.eval)
+} \ No newline at end of file