From 0d5c2f76ea30c6a45471dac635f035e931075453 Mon Sep 17 00:00:00 2001 From: Eugene Burmako Date: Wed, 2 Oct 2013 17:22:07 +0200 Subject: 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. --- test/files/neg/macro-divergence-controlled/Impls_Macros_1.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/files/neg/macro-divergence-controlled') 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}) { -- cgit v1.2.3