scala/scala — pull request #2683 by VladUreche (2013-06-26 09:57:49+00:00)
Title: SI-7344 Specialize methods in private scopes

This performs method specialization inside a scope other than a {class,
trait, object}: could be another method or a value. This specialization
is much simpler, since there is no need to record the new members in
the class signature, their signatures are only visible locally.
It works according to the usual logic:
- we use normalizeMember to create the specialized symbols
- we leave DefDef stubs in the tree that are later filled in by tree
duplication and adaptation

The solution is limited by SI-7579: since the duplicator loses the sym
annotations when duplicating, this expansion and rewiring can only take
place in code that has not been subject to duplication. You can see the
test case for an example.

Review by @dragos, @paulp or @axel22.

Conflicts:

src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala