summaryrefslogtreecommitdiff
path: root/src/reflect/scala/reflect/internal/Symbols.scala
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2012-09-14 15:23:51 +0200
committerEugene Burmako <xeno.by@gmail.com>2012-09-15 00:55:27 +0200
commit210f8c8f108aaf650a5be640c4db0d2336193f33 (patch)
tree6939dd3043ff7dd2af840e9d8a66b2e612c6d78d /src/reflect/scala/reflect/internal/Symbols.scala
parented913c2963c472440b06a3a4cfa3d2853cea21d4 (diff)
downloadscala-210f8c8f108aaf650a5be640c4db0d2336193f33.tar.gz
scala-210f8c8f108aaf650a5be640c4db0d2336193f33.tar.bz2
scala-210f8c8f108aaf650a5be640c4db0d2336193f33.zip
SI-6372 cleans up the API of Attachments
Previously Attachments allowed multiple attachments that correspond to the same attachment type. This created a potential for confusion, given that Attachments.get only searched for the first attachment of a given type. Hence I made Attachments.add overwrite previously existing attachments of a given type and renamed it to Attachments.update, so that the name suits the intention better.
Diffstat (limited to 'src/reflect/scala/reflect/internal/Symbols.scala')
-rw-r--r--src/reflect/scala/reflect/internal/Symbols.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/reflect/scala/reflect/internal/Symbols.scala b/src/reflect/scala/reflect/internal/Symbols.scala
index 430cf58a54..be55b72623 100644
--- a/src/reflect/scala/reflect/internal/Symbols.scala
+++ b/src/reflect/scala/reflect/internal/Symbols.scala
@@ -1600,7 +1600,7 @@ trait Symbols extends api.Symbols { self: SymbolTable =>
setInfo (this.info cloneInfo clone)
setAnnotations this.annotations
)
- this.attachments.all.foreach(clone.addAttachment)
+ this.attachments.all.foreach(clone.updateAttachment)
if (clone.thisSym != clone)
clone.typeOfThis = (clone.typeOfThis cloneInfo clone)