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/compiler/scala/reflect/reify/codegen/GenSymbols.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/compiler/scala/reflect/reify/codegen/GenSymbols.scala')
-rw-r--r-- | src/compiler/scala/reflect/reify/codegen/GenSymbols.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/reflect/reify/codegen/GenSymbols.scala b/src/compiler/scala/reflect/reify/codegen/GenSymbols.scala index c4b674955a..22a834d2e4 100644 --- a/src/compiler/scala/reflect/reify/codegen/GenSymbols.scala +++ b/src/compiler/scala/reflect/reify/codegen/GenSymbols.scala @@ -143,7 +143,7 @@ trait GenSymbols { // produces valid Scala code (with vals in a block depending only on lexically preceding vals) val reification = reificode(sym) import reification.{name, binding} - val tree = reification.tree addAttachment ReifyBindingAttachment(binding) + val tree = reification.tree updateAttachment ReifyBindingAttachment(binding) state.symtab += (sym, name, tree) } fromSymtab |