scala/scala — pull request #633 by retronym (2012-05-27 10:21:45+00:00)
Title: Fix a NSDNHAO in extension methods.

A bridge method, created when we override a method from
a superclass and refine the return type, was appearing
as an overloaded alternative. (`erasure` doesn't create
new scopes, so the bridges it builds are visible at
earlier phases.)

The problem was masked when compiling with specialization,
which *does* create a new scope, shielding the code in
question from the artefacts of erasure.

To fix the problem, we filter out bridge methods from
the overloaded alternatives returned by `.decl`, as would
happen internally in `.member`.

Resubmission of #632.

review by @odersky