scala/scala — pull request #4010 by lrytz (2014-09-29 13:22:51+00:00)
Title: SI-8087 keep annotations on mixed-in private[this] fields

Related to SI-2511 / eea7956, which fixed the same issue for non
`private[this]` fields.

If you have

trait T { private[this] val f = 0 }
class C extends T

Mixin geneartes an accessor method `T.f` with owner `T`. When
generating the field in `C`, the Mixin.mixinTraitMembers calls
`fAccessor.accessed`. The implementation of `accessed` does a lookup
for a member named `"f "` (note the space). The bug is that
`private[this]` fields are not renamed to have space
(`LOCAL_SUFFIX_STRING`) in their name, so the accessed was not found,
and no annotations were copied from it.