summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
authorHubert Plociniczak <hubert.plociniczak@epfl.ch>2010-02-17 11:34:35 +0000
committerHubert Plociniczak <hubert.plociniczak@epfl.ch>2010-02-17 11:34:35 +0000
commitb2e9e1b26b0ac298ffbd71664766705fb0a82438 (patch)
tree24c24fbf7f587473ce45afb9350684fecbf39be9 /src/compiler
parente8ffe2674afc37a61c28eb8c4d5406b9b17112d8 (diff)
downloadscala-b2e9e1b26b0ac298ffbd71664766705fb0a82438.tar.gz
scala-b2e9e1b26b0ac298ffbd71664766705fb0a82438.tar.bz2
scala-b2e9e1b26b0ac298ffbd71664766705fb0a82438.zip
Checking the symbols of parameters in overloade...
Checking the symbols of parameters in overloaded methods didn't seem to work in all cases. Apparently the enclosing class of the owner of the parameter was changing during the compilations from trait to the implementation class. This was causing annoying excessive compilation for Types.scala.
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/scala/tools/nsc/dependencies/Changes.scala8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/dependencies/Changes.scala b/src/compiler/scala/tools/nsc/dependencies/Changes.scala
index 3c000f8a18..6aef637902 100644
--- a/src/compiler/scala/tools/nsc/dependencies/Changes.scala
+++ b/src/compiler/scala/tools/nsc/dependencies/Changes.scala
@@ -41,10 +41,10 @@ abstract class Changes {
}
case class ParentChanged(e: Entity) extends Change
- private val changedTypeParams = new mutable.ListBuffer[String]
+ private val changedTypeParams = new mutable.HashSet[String]
- private def sameSymbol(sym1: Symbol, sym2: Symbol): Boolean =
- sym1.fullName == sym2.fullName
+ private def sameSymbol(sym1: Symbol, sym2: Symbol, simple: Boolean = false): Boolean =
+ if (simple) sym1.encodedName == sym2.encodedName else sym1.fullName == sym2.fullName
private def sameFlags(sym1: Symbol, sym2: Symbol): Boolean =
sym1.flags == sym2.flags
private def sameAnnotations(sym1: Symbol, sym2: Symbol): Boolean =
@@ -108,7 +108,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)) &&
+ (tp1.params corresponds tp2.params)((t1, t2) => sameSymbol(t1, t2, true) && sameFlags(t1, t2)) &&
sameType(res1, res2) &&
mt1.isImplicit == mt2.isImplicit
case (PolyType(tparams1, res1), PolyType(tparams2, res2)) =>