diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2012-09-14 15:23:51 +0200 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2012-09-15 00:55:27 +0200 |
commit | 210f8c8f108aaf650a5be640c4db0d2336193f33 (patch) | |
tree | 6939dd3043ff7dd2af840e9d8a66b2e612c6d78d /src/reflect/scala/reflect/internal/Symbols.scala | |
parent | ed913c2963c472440b06a3a4cfa3d2853cea21d4 (diff) | |
download | scala-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.scala | 2 |
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) |