summaryrefslogtreecommitdiff
path: root/test/pending
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2012-07-17 12:36:11 +0200
committerEugene Burmako <xeno.by@gmail.com>2012-07-20 10:04:58 +0200
commit30f5a36941aa1671849322ba79ebff0881ae7ff0 (patch)
treee76028cbb9d52b9ade6067b2d3aa82c8326fb009 /test/pending
parenta8bd1e25b9fe32a8eff2f51ee3bfa527440beb84 (diff)
downloadscala-30f5a36941aa1671849322ba79ebff0881ae7ff0.tar.gz
scala-30f5a36941aa1671849322ba79ebff0881ae7ff0.tar.bz2
scala-30f5a36941aa1671849322ba79ebff0881ae7ff0.zip
SI-5999 removes Context.reify
Currently there are discrepancies between the behavior of c.reify and c.universe.reify. First step in fixing these problems is removing the duplication in the API. That's why I'm cutting away the Context.reify shortcut. Context.reify is a magic macro, hardwired in the fast track mechanism, so removing it requires redeploying the starr (because an old starr will crash if launched on sources that don't contain Context.reify). To cleanly redeploy a starr I've left a Context.reify stub in sources, but hidden it behind a `protected` modifier. When starr is redeployed (in a subsequent commit) the stub will be removed. I've also updated the tests to use c.universe.reify instead of c.reify. This will break some of them, because c.universe.reify uses a standard compiler mirror, which unlike a macro mirror doesn't like packageless classes. That's an annoyance, but I think having clean separation of commits is more important that being 100% consistent.
Diffstat (limited to 'test/pending')
-rw-r--r--test/pending/run/macro-expand-implicit-macro-defeats-type-inference/Impls_1.scala2
-rw-r--r--test/pending/run/macro-reify-array/Macros_1.scala2
-rw-r--r--test/pending/run/macro-reify-tagful-b/Macros_1.scala2
-rw-r--r--test/pending/run/macro-reify-tagless-b/Impls_Macros_1.scala2
-rw-r--r--test/pending/run/t5692/Impls_Macros_1.scala2
5 files changed, 5 insertions, 5 deletions
diff --git a/test/pending/run/macro-expand-implicit-macro-defeats-type-inference/Impls_1.scala b/test/pending/run/macro-expand-implicit-macro-defeats-type-inference/Impls_1.scala
index 1740f40daf..599ddf5ed9 100644
--- a/test/pending/run/macro-expand-implicit-macro-defeats-type-inference/Impls_1.scala
+++ b/test/pending/run/macro-expand-implicit-macro-defeats-type-inference/Impls_1.scala
@@ -1,7 +1,7 @@
import scala.reflect.makro.Context
object Impls {
- def foo[T: c.TypeTag](c: Context): c.Expr[List[T]] = c.reify {
+ def foo[T: c.TypeTag](c: Context): c.Expr[List[T]] = c.universe.reify {
println("openImplicits are: " + c.literal(c.openImplicits.toString).splice)
println("enclosingImplicits are: " + c.literal(c.enclosingImplicits.toString).splice)
println("typetag is: " + c.literal(c.tag[T].toString).splice)
diff --git a/test/pending/run/macro-reify-array/Macros_1.scala b/test/pending/run/macro-reify-array/Macros_1.scala
index c1bd4187a6..4b4cb05884 100644
--- a/test/pending/run/macro-reify-array/Macros_1.scala
+++ b/test/pending/run/macro-reify-array/Macros_1.scala
@@ -4,7 +4,7 @@ object Macros {
def foo[T](s: String) = macro Impls.foo[T]
object Impls {
- def foo[T: c.TypeTag](c: Ctx)(s: c.Expr[T]) = c.reify {
+ def foo[T: c.TypeTag](c: Ctx)(s: c.Expr[T]) = c.universe.reify {
Array(s.splice)
}
}
diff --git a/test/pending/run/macro-reify-tagful-b/Macros_1.scala b/test/pending/run/macro-reify-tagful-b/Macros_1.scala
index 04cf46d3a5..f730bb51f1 100644
--- a/test/pending/run/macro-reify-tagful-b/Macros_1.scala
+++ b/test/pending/run/macro-reify-tagful-b/Macros_1.scala
@@ -4,7 +4,7 @@ object Macros {
def foo[T](s: T) = macro Impls.foo[List[T]]
object Impls {
- def foo[T: c.TypeTag](c: Ctx)(s: c.Expr[T]) = c.reify {
+ def foo[T: c.TypeTag](c: Ctx)(s: c.Expr[T]) = c.universe.reify {
List(s.splice)
}
}
diff --git a/test/pending/run/macro-reify-tagless-b/Impls_Macros_1.scala b/test/pending/run/macro-reify-tagless-b/Impls_Macros_1.scala
index 04366353eb..2c5079ea54 100644
--- a/test/pending/run/macro-reify-tagless-b/Impls_Macros_1.scala
+++ b/test/pending/run/macro-reify-tagless-b/Impls_Macros_1.scala
@@ -4,7 +4,7 @@ object Macros {
def foo[T](s: T) = macro Impls.foo[List[T]]
object Impls {
- def foo[T](c: Ctx)(s: c.Expr[T]) = c.reify {
+ def foo[T](c: Ctx)(s: c.Expr[T]) = c.universe.reify {
List(s.splice)
}
}
diff --git a/test/pending/run/t5692/Impls_Macros_1.scala b/test/pending/run/t5692/Impls_Macros_1.scala
index f9c1e5f12b..7d0e788bd6 100644
--- a/test/pending/run/t5692/Impls_Macros_1.scala
+++ b/test/pending/run/t5692/Impls_Macros_1.scala
@@ -1,7 +1,7 @@
import scala.reflect.makro.Context
object Impls {
- def impl[A](c: reflect.makro.Context) = c.reify(())
+ def impl[A](c: reflect.makro.Context) = c.universe.reify(())
}
object Macros {