summaryrefslogtreecommitdiff
path: root/test/files/run/reify_renamed_type_spliceable.scala
diff options
context:
space:
mode:
authorAndriy Polishchuk <andriy.s.polishchuk@gmail.com>2012-12-06 11:59:05 +0200
committerAndriy Polishchuk <andriy.s.polishchuk@gmail.com>2012-12-06 13:10:53 +0200
commit0433ca4fc8c1ad0d0733b2fdccc6352904a5a531 (patch)
treec45e6d26f340802cc18c7b4035e1d422897bdb4c /test/files/run/reify_renamed_type_spliceable.scala
parent1cfb36317834f9bca0c3ce94e92590f7b4ace3b7 (diff)
downloadscala-0433ca4fc8c1ad0d0733b2fdccc6352904a5a531.tar.gz
scala-0433ca4fc8c1ad0d0733b2fdccc6352904a5a531.tar.bz2
scala-0433ca4fc8c1ad0d0733b2fdccc6352904a5a531.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_spliceable.scala')
-rw-r--r--test/files/run/reify_renamed_type_spliceable.scala21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/files/run/reify_renamed_type_spliceable.scala b/test/files/run/reify_renamed_type_spliceable.scala
new file mode 100644
index 0000000000..9c2cff5199
--- /dev/null
+++ b/test/files/run/reify_renamed_type_spliceable.scala
@@ -0,0 +1,21 @@
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
+
+abstract class C {
+ type T >: Null
+}
+
+object Test extends App {
+ def foo(c: C) = {
+ import c.{T => U}
+ reify {
+ val x: U = null
+ }
+ }
+
+ val expr = foo(new C {
+ type T = AnyRef
+ })
+
+ println(expr.eval)
+} \ No newline at end of file