diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2014-02-16 16:45:27 +0100 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2014-02-16 16:45:27 +0100 |
commit | 6ef6c96eff2f0d2f505d45a1436d73a960193076 (patch) | |
tree | 6df5b2255fb4e369059fae1f3efbfdbe9c1506c6 /src/compiler/scala/tools/nsc/typechecker/StdAttachments.scala | |
parent | d300fb6250dc0abdfb74194438bfc778446a9856 (diff) | |
parent | a02e053a5dec134f7c7dc53a2c1091039218237d (diff) | |
download | scala-6ef6c96eff2f0d2f505d45a1436d73a960193076.tar.gz scala-6ef6c96eff2f0d2f505d45a1436d73a960193076.tar.bz2 scala-6ef6c96eff2f0d2f505d45a1436d73a960193076.zip |
Merge pull request #3397 from xeno-by/ticket/5920
SI-5920 enables default and named args in macros
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/StdAttachments.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/StdAttachments.scala | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/StdAttachments.scala b/src/compiler/scala/tools/nsc/typechecker/StdAttachments.scala index 57f27a05fd..1a6d2f0011 100644 --- a/src/compiler/scala/tools/nsc/typechecker/StdAttachments.scala +++ b/src/compiler/scala/tools/nsc/typechecker/StdAttachments.scala @@ -85,6 +85,7 @@ trait StdAttachments { tree match { // see the comment to `isMacroExpansionSuppressed` to learn why we need // a special traversal strategy here + case Block(_, expr) => unsuppressMacroExpansion(expr) case Apply(fn, _) => unsuppressMacroExpansion(fn) case TypeApply(fn, _) => unsuppressMacroExpansion(fn) case _ => // do nothing @@ -101,6 +102,8 @@ trait StdAttachments { // we have to account for the fact that during typechecking an expandee might become wrapped, // i.e. surrounded by an inferred implicit argument application or by an inferred type argument application. // in that case the expandee itself will no longer be suppressed and we need to look at the core + // upd. we also need to allow for blocks, because that's what names and defaults are often desugared to + case Block(_, expr) => isMacroExpansionSuppressed(expr) case Apply(fn, _) => isMacroExpansionSuppressed(fn) case TypeApply(fn, _) => isMacroExpansionSuppressed(fn) case _ => false |