summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Tags.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Tags.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Tags.scala4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Tags.scala b/src/compiler/scala/tools/nsc/typechecker/Tags.scala
index 21fdf75d66..e29451f379 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Tags.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Tags.scala
@@ -13,9 +13,7 @@ trait Tags {
private val runDefinitions = currentRun.runDefinitions
private def resolveTag(pos: Position, taggedTp: Type, allowMaterialization: Boolean) = enteringTyper {
- if (allowMaterialization) context.withMacrosEnabled{ inferImplicitByType(taggedTp, context, pos).tree }
- else context.withMacrosDisabled{ inferImplicitByType(taggedTp, context, pos).tree }
-
+ context.withMacros(enabled = allowMaterialization) { inferImplicitByType(taggedTp, context, pos).tree }
}
/** Finds in scope or materializes a ClassTag.