summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/scala/tools/nsc')
-rw-r--r--src/compiler/scala/tools/nsc/ast/FreeVars.scala4
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Implicits.scala3
2 files changed, 4 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/FreeVars.scala b/src/compiler/scala/tools/nsc/ast/FreeVars.scala
index 1bf36e8bf2..a1983d1834 100644
--- a/src/compiler/scala/tools/nsc/ast/FreeVars.scala
+++ b/src/compiler/scala/tools/nsc/ast/FreeVars.scala
@@ -13,9 +13,9 @@ trait FreeVars extends reflect.internal.FreeVars { self: Global =>
case Reified(_, symbolTable, _) =>
// logging free vars only when they are untyped prevents avalanches of duplicate messages
symbolTable foreach {
- case FreeTermDef(_, _, binding, origin) if settings.logFreeTerms.value && binding.tpe == null =>
+ case FreeTermDef(_, _, binding, _, origin) if settings.logFreeTerms.value && binding.tpe == null =>
reporter.echo(position, "free term: %s %s".format(showRaw(binding), origin))
- case FreeTypeDef(_, _, binding, origin) if settings.logFreeTypes.value && binding.tpe == null =>
+ case FreeTypeDef(_, _, binding, _, origin) if settings.logFreeTypes.value && binding.tpe == null =>
reporter.echo(position, "free type: %s %s".format(showRaw(binding), origin))
case _ =>
// do nothing
diff --git a/src/compiler/scala/tools/nsc/typechecker/Implicits.scala b/src/compiler/scala/tools/nsc/typechecker/Implicits.scala
index 4fb9362ccc..30a79917c9 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Implicits.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Implicits.scala
@@ -1161,7 +1161,8 @@ trait Implicits {
// todo. migrate hardcoded materialization in Implicits to corresponding implicit macros
var materializer = atPos(pos.focus)(Apply(TypeApply(Ident(TagMaterializers(tagClass)), List(TypeTree(tp))), List(prefix)))
if (settings.XlogImplicits.value) println("materializing requested %s.%s[%s] using %s".format(pre, tagClass.name, tp, materializer))
- success(materializer)
+ if (context.macrosEnabled) success(materializer)
+ else failure(materializer, "macros are disabled")
}
/** The manifest corresponding to type `pt`, provided `pt` is an instance of Manifest.