diff options
author | Andriy Polishchuk <andriy.s.polishchuk@gmail.com> | 2012-12-06 11:59:05 +0200 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2012-12-11 08:19:40 +0100 |
commit | 286abfc4cf6ed41c1622f4964aae321b0b9b6c6d (patch) | |
tree | 825c527163321df125d8291d63b896f1ccae81cd /test/files/run/reify_renamed_term_overloaded_method.scala | |
parent | 0acb8a30c379f268e8a3e1340504530493a1a1dc (diff) | |
download | scala-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_term_overloaded_method.scala')
-rw-r--r-- | test/files/run/reify_renamed_term_overloaded_method.scala | 17 |
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 |