diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2013-12-11 19:36:18 +0100 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2013-12-11 19:36:18 +0100 |
commit | 44ccf7fc30faeaca9e325453268bd443add01e49 (patch) | |
tree | 27f68b8bd88e15b81792a78fa504f7dfb18a4d4d /src/compiler | |
parent | ceeab40611dde9183e7a8de32b7eba87ef133094 (diff) | |
parent | a774157a4b666f29b7cd4bd958ea1ac150380959 (diff) | |
download | scala-44ccf7fc30faeaca9e325453268bd443add01e49.tar.gz scala-44ccf7fc30faeaca9e325453268bd443add01e49.tar.bz2 scala-44ccf7fc30faeaca9e325453268bd443add01e49.zip |
Merge commit 'a774157' into merge/2.10.x-to-master
Conflicts:
src/compiler/scala/tools/nsc/transform/Erasure.scala
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/transform/Erasure.scala | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/transform/Erasure.scala b/src/compiler/scala/tools/nsc/transform/Erasure.scala index 6fe0f34105..6732900ef2 100644 --- a/src/compiler/scala/tools/nsc/transform/Erasure.scala +++ b/src/compiler/scala/tools/nsc/transform/Erasure.scala @@ -714,11 +714,24 @@ abstract class Erasure extends AddInterfaces /** TODO - adapt SymbolPairs so it can be used here. */ private def checkNoDeclaredDoubleDefs(base: Symbol) { val decls = base.info.decls + + // SI-8010 force infos, otherwise makeNotPrivate in ExplicitOuter info transformer can trigger + // a scope rehash while were iterating and we can see the same entry twice! + // Inspection of SymbolPairs (the basis of OverridingPairs), suggests that it is immune + // from this sort of bug as it copies the symbols into a temporary scope *before* any calls to `.info`, + // ie, no variant of it calls `info` or `tpe` in `SymbolPair#exclude`. + // + // Why not just create a temporary scope here? We need to force the name changes in any case before + // we do these checks, so that we're comparing same-named methods based on the expanded names that actually + // end up in the bytecode. + exitingPostErasure(decls.foreach(_.info)) + var e = decls.elems while (e ne null) { if (e.sym.isTerm) { var e1 = decls lookupNextEntry e while (e1 ne null) { + assert(e.sym ne e1.sym, s"Internal error: encountered ${e.sym.debugLocationString} twice during scope traversal. This might be related to SI-8010.") if (sameTypeAfterErasure(e.sym, e1.sym)) doubleDefError(new SymbolPair(base, e.sym, e1.sym)) |