diff options
author | Andriy Polishchuk <andriy.s.polishchuk@gmail.com> | 2012-12-06 11:59:05 +0200 |
---|---|---|
committer | Andriy Polishchuk <andriy.s.polishchuk@gmail.com> | 2012-12-06 13:10:53 +0200 |
commit | 0433ca4fc8c1ad0d0733b2fdccc6352904a5a531 (patch) | |
tree | c45e6d26f340802cc18c7b4035e1d422897bdb4c /test/files/run/reify_renamed_type_basic.scala | |
parent | 1cfb36317834f9bca0c3ce94e92590f7b4ace3b7 (diff) | |
download | scala-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_basic.scala')
-rw-r--r-- | test/files/run/reify_renamed_type_basic.scala | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/files/run/reify_renamed_type_basic.scala b/test/files/run/reify_renamed_type_basic.scala new file mode 100644 index 0000000000..23729e5c54 --- /dev/null +++ b/test/files/run/reify_renamed_type_basic.scala @@ -0,0 +1,16 @@ +import scala.reflect.runtime.universe._ +import scala.tools.reflect.Eval + +object O { + type A = Unit +} + +object Test extends App { + import O.{A => X} + + def expr = reify { + val a: X = () + } + + println(expr.eval) +}
\ No newline at end of file |