scala/scala — pull request #802 by retronym (2012-07-01 11:01:17+00:00)
Title: SI-5489 Avoid accidentally adding members to Object in erasure.

`Symbol#classBound` assumed that `refinedType` would return a
a type based on new refinement class symbol; but that isn't so
during erasure. Instead, it returns the first super class, into
which we entered new members. Needless to say, the next run of the
resident compiler didn't take kindly to these hijinks.

To remedy the situation, I've added (yet another) condition
on `phase.erasedTypes`.

Some more analysis in the comments of [SI-5489](https://issues.scala-lang.org/browse/SI-5489)

Review by @odersky