diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2013-06-27 17:09:39 +0200 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2013-06-28 12:48:10 +0200 |
commit | 55decf733eb361c235ef1bd9039e5c6226202a96 (patch) | |
tree | c6b59c63d986352f12e25a890d5fffc565a5d593 /src/compiler | |
parent | f89f2d969fa0ed0a6bf036a1f6a9cad8267a7265 (diff) | |
download | scala-55decf733eb361c235ef1bd9039e5c6226202a96.tar.gz scala-55decf733eb361c235ef1bd9039e5c6226202a96.tar.bz2 scala-55decf733eb361c235ef1bd9039e5c6226202a96.zip |
makes it more convenient to work with SuppressMacroExpansionAttachment
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Typers.scala | 4 |
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 29cd3d4bfa..ecbab41db3 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -1147,7 +1147,7 @@ trait Typers extends Modes with Adaptations with Tags { else if ( inExprModeButNot(mode, FUNmode) && !tree.isDef && // typechecking application tree.symbol != null && tree.symbol.isTermMacro && // of a macro - !tree.attachments.get[SuppressMacroExpansionAttachment.type].isDefined) + !isMacroExpansionSuppressed(tree)) macroExpand(this, tree, mode, pt) else if ((mode & (PATTERNmode | FUNmode)) == (PATTERNmode | FUNmode)) adaptConstrPattern() @@ -5352,7 +5352,7 @@ trait Typers extends Modes with Adaptations with Tags { // that typecheck must not trigger macro expansions, so we explicitly prohibit them // however we cannot do `context.withMacrosDisabled` // because `expr` might contain nested macro calls (see SI-6673) - val exprTyped = typed1(expr updateAttachment SuppressMacroExpansionAttachment, mode, pt) + val exprTyped = typed1(suppressMacroExpansion(expr), mode, pt) exprTyped match { case macroDef if macroDef.symbol != null && macroDef.symbol.isTermMacro && !macroDef.symbol.isErroneous => MacroEtaError(exprTyped) |