scala/scala — pull request #681 by odersky (2012-06-08 13:05:21+00:00)
Title: Avoids cyclic reference error in AddInterfaces.

Compile Global or Typers twice in resident mode yielded a CyclicReference error, in phase erasure. The error was due to a cyclic call of the isDerivedValue method. Checking I noted that isDerivedValue is called very often, and mostly unneccessarily. I tightened the condition to not force the type of the class if it is a trait or package. This made the CyclicReference go away.

2nd, corrected pull request widened criterion that enables validation of derived value classes. Previous version made two neg tests slip through.

Review by @adriaanm