summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
index 76ea68442f..2b7c8e8304 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
@@ -2745,7 +2745,7 @@ trait Typers extends Modes with Adaptations with PatMatVirtualiser {
val lencmp = compareLengths(args, formals)
def checkNotMacro() = {
- if (fun.symbol != null && fun.symbol.filter(sym => sym != null && sym.isTermMacro) != NoSymbol)
+ if (fun.symbol != null && fun.symbol.filter(sym => sym != null && sym.isTermMacro && !sym.isErroneous) != NoSymbol)
duplErrorTree(NamedAndDefaultArgumentsNotSupportedForMacros(tree, fun))
}
@@ -4574,7 +4574,7 @@ trait Typers extends Modes with Adaptations with PatMatVirtualiser {
// A: solely for robustness reasons. this mechanism might change in the future, which might break unprotected code
val expr1 = context.withMacrosDisabled(typed1(expr, mode, pt))
expr1 match {
- case macroDef if macroDef.symbol.isTermMacro =>
+ case macroDef if macroDef.symbol != null && macroDef.symbol.isTermMacro && !macroDef.symbol.isErroneous =>
MacroEtaError(expr1)
case _ =>
typedEta(checkDead(expr1))