diff options
author | Josh Suereth <Joshua.Suereth@gmail.com> | 2012-11-21 09:35:44 -0800 |
---|---|---|
committer | Josh Suereth <Joshua.Suereth@gmail.com> | 2012-11-21 09:35:44 -0800 |
commit | a0e642b7fe608b869071b690e7907b934b10db5a (patch) | |
tree | a07ba7a88be3264f14d34d542ea3f42241d0630f /src/reflect | |
parent | 1a487a545d63715d10116fce007d6d5519eba6e4 (diff) | |
parent | 1fd3a2a289dae54840b091b822c29019d2ccb565 (diff) | |
download | scala-a0e642b7fe608b869071b690e7907b934b10db5a.tar.gz scala-a0e642b7fe608b869071b690e7907b934b10db5a.tar.bz2 scala-a0e642b7fe608b869071b690e7907b934b10db5a.zip |
Merge pull request #1645 from scalamacros/ticket/6673
SI-6673 fixes macro problems with eta expansions
Diffstat (limited to 'src/reflect')
-rw-r--r-- | src/reflect/scala/reflect/internal/StdAttachments.scala | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/reflect/scala/reflect/internal/StdAttachments.scala b/src/reflect/scala/reflect/internal/StdAttachments.scala index 9fe443bf50..1df91a67b0 100644 --- a/src/reflect/scala/reflect/internal/StdAttachments.scala +++ b/src/reflect/scala/reflect/internal/StdAttachments.scala @@ -19,9 +19,26 @@ trait StdAttachments { def setPos(newpos: Position): this.type = { pos = newpos; this } } + /** When present, indicates that the host `Ident` has been created from a backquoted identifier. + */ case object BackquotedIdentifierAttachment + /** Stores the trees that give rise to a refined type to be used in reification. + * Unfortunately typed `CompoundTypeTree` is lacking essential info, and the reifier cannot use `CompoundTypeTree.tpe`. + * Therefore we need this hack (see `Reshape.toPreTyperTypeTree` for a detailed explanation). + */ case class CompoundTypeTreeOriginalAttachment(parents: List[Tree], stats: List[Tree]) + /** Is added by the macro engine to the results of macro expansions. + * Stores the original expandee as it entered the `macroExpand` function. + */ case class MacroExpansionAttachment(original: Tree) + + /** When present, suppresses macro expansion for the host. + * This is occasionally necessary, e.g. to prohibit eta-expansion of macros. + * + * Does not affect expandability of child nodes, there's context.withMacrosDisabled for that + * (but think thrice before using that API - see the discussion at https://github.com/scala/scala/pull/1639). + */ + case object SuppressMacroExpansionAttachment } |