diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2013-10-02 17:22:07 +0200 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2013-11-12 18:40:01 -0800 |
commit | 0d5c2f76ea30c6a45471dac635f035e931075453 (patch) | |
tree | 15f477eb256a65f2d260b940f1a3c9bed113a3db /test/files/neg/macro-divergence-controlled | |
parent | 6038bac3513a834e67ab4074c2c7b03aac11b1b3 (diff) | |
download | scala-0d5c2f76ea30c6a45471dac635f035e931075453.tar.gz scala-0d5c2f76ea30c6a45471dac635f035e931075453.tar.bz2 scala-0d5c2f76ea30c6a45471dac635f035e931075453.zip |
blackbox restriction #3: can't affect implicit search
When an application of a blackbox macro is used as an implicit candidate,
no expansion is performed until the macro is selected as the result of
the implicit search.
This makes it impossible to dynamically calculate availability of
implicit macros.
Diffstat (limited to 'test/files/neg/macro-divergence-controlled')
-rw-r--r-- | test/files/neg/macro-divergence-controlled/Impls_Macros_1.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/files/neg/macro-divergence-controlled/Impls_Macros_1.scala b/test/files/neg/macro-divergence-controlled/Impls_Macros_1.scala index 23fcdd6445..9fb374800b 100644 --- a/test/files/neg/macro-divergence-controlled/Impls_Macros_1.scala +++ b/test/files/neg/macro-divergence-controlled/Impls_Macros_1.scala @@ -1,4 +1,4 @@ -import scala.reflect.macros.BlackboxContext +import scala.reflect.macros.WhiteboxContext import language.experimental.macros trait Complex[T] @@ -6,7 +6,7 @@ trait Complex[T] class Foo(val foo: Foo) object Complex { - def impl[T: c.WeakTypeTag](c: BlackboxContext): c.Expr[Complex[T]] = { + def impl[T: c.WeakTypeTag](c: WhiteboxContext): c.Expr[Complex[T]] = { import c.universe._ val tpe = weakTypeOf[T] for (f <- tpe.declarations.collect{case f: TermSymbol if f.isParamAccessor && !f.isMethod => f}) { |