diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2012-06-04 13:53:13 +0200 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2012-06-08 15:32:17 +0200 |
commit | 7b0f0a142bb526f4bd108a8c208ec9a8952398c9 (patch) | |
tree | ee13d036756be41521a9eb3f1e05898410ab744e /test/files/run/macro-invalidret-nontypeable | |
parent | d9103e01b467634d61baa3b131aeb93fca9e20a5 (diff) | |
download | scala-7b0f0a142bb526f4bd108a8c208ec9a8952398c9.tar.gz scala-7b0f0a142bb526f4bd108a8c208ec9a8952398c9.tar.bz2 scala-7b0f0a142bb526f4bd108a8c208ec9a8952398c9.zip |
repairs the tests after the refactoring spree
Diffstat (limited to 'test/files/run/macro-invalidret-nontypeable')
-rw-r--r-- | test/files/run/macro-invalidret-nontypeable/Impls_Macros_1.scala | 6 | ||||
-rw-r--r-- | test/files/run/macro-invalidret-nontypeable/Test_2.scala | 6 |
2 files changed, 7 insertions, 5 deletions
diff --git a/test/files/run/macro-invalidret-nontypeable/Impls_Macros_1.scala b/test/files/run/macro-invalidret-nontypeable/Impls_Macros_1.scala index f3a0476a35..04eef976c5 100644 --- a/test/files/run/macro-invalidret-nontypeable/Impls_Macros_1.scala +++ b/test/files/run/macro-invalidret-nontypeable/Impls_Macros_1.scala @@ -2,12 +2,12 @@ import scala.reflect.makro.{Context => Ctx} object Impls { def foo(c: Ctx) = { - import c.mirror._ + import c.universe._ val body = Ident("IDoNotExist") - Expr[Int](body) + c.Expr[Int](body) } } object Macros { def foo = macro Impls.foo -} +}
\ No newline at end of file diff --git a/test/files/run/macro-invalidret-nontypeable/Test_2.scala b/test/files/run/macro-invalidret-nontypeable/Test_2.scala index ecf48b9752..c6caa2b585 100644 --- a/test/files/run/macro-invalidret-nontypeable/Test_2.scala +++ b/test/files/run/macro-invalidret-nontypeable/Test_2.scala @@ -1,6 +1,8 @@ object Test extends App { - import scala.reflect.mirror._ + import scala.reflect.runtime.universe._ + import scala.reflect.runtime.{currentMirror => cm} + import scala.tools.reflect.ToolBox val tree = Select(Ident("Macros"), newTermName("foo")) - try Expr(tree).eval + try cm.mkToolBox().runExpr(tree) catch { case ex: Throwable => println(ex.getMessage) } }
\ No newline at end of file |