summaryrefslogtreecommitdiff
path: root/src/reflect/scala/reflect/internal/StdAttachments.scala
diff options
context:
space:
mode:
authorDen Shabalin <den.shabalin@gmail.com>2013-10-31 11:47:51 +0100
committerDen Shabalin <den.shabalin@gmail.com>2013-11-12 14:04:42 +0100
commitc6fe22f5479458a688a819f92f2af43c5867ea81 (patch)
treecf51804be7b997336d2b2e4f93a082500f1bbaa2 /src/reflect/scala/reflect/internal/StdAttachments.scala
parentee1e81aa39ccbb44a4176eaf0dde5bc2e2ad5ddd (diff)
downloadscala-c6fe22f5479458a688a819f92f2af43c5867ea81.tar.gz
scala-c6fe22f5479458a688a819f92f2af43c5867ea81.tar.bz2
scala-c6fe22f5479458a688a819f92f2af43c5867ea81.zip
add support for importable attachments
Previously attachments weren't imported by importTree. Now a new marker trait has been added that lets attachments to import themselves to the new universe together with all their innards. Additionally a simpler subtrait is defined to mark attachments that can be imported as-is.
Diffstat (limited to 'src/reflect/scala/reflect/internal/StdAttachments.scala')
-rw-r--r--src/reflect/scala/reflect/internal/StdAttachments.scala8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/reflect/scala/reflect/internal/StdAttachments.scala b/src/reflect/scala/reflect/internal/StdAttachments.scala
index 2e89ffca56..fe4438015d 100644
--- a/src/reflect/scala/reflect/internal/StdAttachments.scala
+++ b/src/reflect/scala/reflect/internal/StdAttachments.scala
@@ -22,13 +22,13 @@ 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])
+
+ /** When present, indicates that the host `Ident` has been created from a backquoted identifier.
+ */
+ case object BackquotedIdentifierAttachment extends PlainAttachment
}