diff options
author | Hubert Plociniczak <hubert.plociniczak@epfl.ch> | 2010-02-01 16:16:11 +0000 |
---|---|---|
committer | Hubert Plociniczak <hubert.plociniczak@epfl.ch> | 2010-02-01 16:16:11 +0000 |
commit | 490ed74ff8e5c70789cde74646fd6c2b7abbfc21 (patch) | |
tree | b699a68c26de32cf963461661794763a7c6ca049 /src/compiler | |
parent | 131b264b25c2e2d74b63b0f5859ead1a3581c046 (diff) | |
download | scala-490ed74ff8e5c70789cde74646fd6c2b7abbfc21.tar.gz scala-490ed74ff8e5c70789cde74646fd6c2b7abbfc21.tar.bz2 scala-490ed74ff8e5c70789cde74646fd6c2b7abbfc21.zip |
Exclude anonymous function classes from the def...
Exclude anonymous function classes from the definitions in dependency
analysis. This was causing spurious errors in for example Global.scala
and Interpreter.scala because of fresh names numbering. Also cleanup up
some code. No review.
Diffstat (limited to 'src/compiler')
3 files changed, 5 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/dependencies/Changes.scala b/src/compiler/scala/tools/nsc/dependencies/Changes.scala index ddab003752..a1250dc40f 100644 --- a/src/compiler/scala/tools/nsc/dependencies/Changes.scala +++ b/src/compiler/scala/tools/nsc/dependencies/Changes.scala @@ -101,7 +101,7 @@ abstract class Changes { case (mt1 @ MethodType(params1, res1), mt2 @ MethodType(params2, res2)) => // new dependent types: probably fix this, use substSym as done for PolyType (sameTypes(tp1.paramTypes, tp2.paramTypes) && - (tp1.params corresponds tp2.params)((t1, t2) => sameSymbol(t1, t2) && sameFlags(t1, t2)) && // @PP: corresponds + (tp1.params corresponds tp2.params)((t1, t2) => sameSymbol(t1, t2) && sameFlags(t1, t2)) && sameType(res1, res2) && mt1.isImplicit == mt2.isImplicit) diff --git a/src/compiler/scala/tools/nsc/dependencies/DependencyAnalysis.scala b/src/compiler/scala/tools/nsc/dependencies/DependencyAnalysis.scala index 761b9dac3c..008fc73a53 100644 --- a/src/compiler/scala/tools/nsc/dependencies/DependencyAnalysis.scala +++ b/src/compiler/scala/tools/nsc/dependencies/DependencyAnalysis.scala @@ -167,7 +167,8 @@ trait DependencyAnalysis extends SubComponent with Files { } tree match { - case cdef: ClassDef if !cdef.symbol.hasFlag(Flags.PACKAGE) => + case cdef: ClassDef if !cdef.symbol.hasFlag(Flags.PACKAGE) && + !cdef.symbol.isAnonymousFunction => buf += cdef.symbol atPhase(currentRun.erasurePhase.prev) { for (s <- cdef.symbol.info.decls) diff --git a/src/compiler/scala/tools/nsc/interactive/RefinedBuildManager.scala b/src/compiler/scala/tools/nsc/interactive/RefinedBuildManager.scala index 9d66564c18..ee103b8d33 100644 --- a/src/compiler/scala/tools/nsc/interactive/RefinedBuildManager.scala +++ b/src/compiler/scala/tools/nsc/interactive/RefinedBuildManager.scala @@ -131,9 +131,9 @@ class RefinedBuildManager(val settings: Settings) extends Changes with BuildMana // Deterministic behaviour required by partest val changesOf = new mutable.HashMap[Symbol, List[Change]] { override def toString: String = { - val syms = toList.sort(_._1.fullName < _._1.fullName) + val syms = toList.sortWith(_._1.fullName < _._1.fullName) val changesOrdered = syms.map(entry => { - val list = entry._2.sort(_.toString < _.toString) + val list = entry._2.sortWith(_.toString < _.toString) entry._1.toString + " -> " + list.mkString("List(", ", ", ")") }) changesOrdered.mkString("Map(", ", ", ")") |