summaryrefslogtreecommitdiff
path: root/test/files/run/reify_renamed_term_overloaded_method.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_term_overloaded_method.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_term_overloaded_method.scala')
-rw-r--r--test/files/run/reify_renamed_term_overloaded_method.scala17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/files/run/reify_renamed_term_overloaded_method.scala b/test/files/run/reify_renamed_term_overloaded_method.scala
new file mode 100644
index 0000000000..3ef442d203
--- /dev/null
+++ b/test/files/run/reify_renamed_term_overloaded_method.scala
@@ -0,0 +1,17 @@
+import scala.reflect.runtime.universe._
+import scala.tools.reflect.Eval
+
+object O {
+ def show(i: Int) = i.toString
+ def show(s: String) = s
+}
+
+object Test extends App {
+ import O.{show => s}
+
+ val expr = reify {
+ s("1") + s(2)
+ }
+
+ println(expr.eval)
+} \ No newline at end of file