diff options
author | Martin Odersky <odersky@gmail.com> | 2012-06-08 10:43:47 +0200 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@epfl.ch> | 2012-06-08 16:43:15 +0200 |
commit | be3d06b33284b133e783ce6ed6e8206f4646319c (patch) | |
tree | 8e3123bb11d564e10c5e2837e43f828f1a9d13d6 /src/reflect | |
parent | 1dd02bdd72707e0f39bd1d8e381908b25ff7c5d7 (diff) | |
download | scala-be3d06b33284b133e783ce6ed6e8206f4646319c.tar.gz scala-be3d06b33284b133e783ce6ed6e8206f4646319c.tar.bz2 scala-be3d06b33284b133e783ce6ed6e8206f4646319c.zip |
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 isDerivedValue class. Checking I noted that isDerivedValue class is called very often, and mostly unneccessesarily. I tightened teh condition to not force the type of the class if it is a trait or package. This made the CyclicReference go away.
Widened criterion that enables validation of derived value classes. Previous version made two neg tests slip through.
Diffstat (limited to 'src/reflect')
-rw-r--r-- | src/reflect/scala/reflect/internal/Symbols.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/reflect/scala/reflect/internal/Symbols.scala b/src/reflect/scala/reflect/internal/Symbols.scala index 86693cf880..288eb63332 100644 --- a/src/reflect/scala/reflect/internal/Symbols.scala +++ b/src/reflect/scala/reflect/internal/Symbols.scala @@ -666,7 +666,8 @@ trait Symbols extends api.Symbols { self: SymbolTable => def isClassLocalToConstructor = false final def isDerivedValueClass = - isClass && info.firstParent.typeSymbol == AnyValClass && !isPrimitiveValueClass + isClass && !hasFlag(PACKAGE | TRAIT) && + info.firstParent.typeSymbol == AnyValClass && !isPrimitiveValueClass final def isMethodWithExtension = isMethod && owner.isDerivedValueClass && !isParamAccessor && !isConstructor && !hasFlag(SUPERACCESSOR) |