summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2007-06-19 12:17:32 +0000
committerMartin Odersky <odersky@gmail.com>2007-06-19 12:17:32 +0000
commitc184cc70967086343dccef06737b641f9903580c (patch)
treeb028daf6ad1635e8e5d2c4ac320cf1a8163787b3 /src/compiler
parent6d5979b71423b55121c582786e5d052c1419ac41 (diff)
downloadscala-c184cc70967086343dccef06737b641f9903580c.tar.gz
scala-c184cc70967086343dccef06737b641f9903580c.tar.bz2
scala-c184cc70967086343dccef06737b641f9903580c.zip
fixed test file; fixed Long/Long bug
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Infer.scala25
1 files changed, 11 insertions, 14 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Infer.scala b/src/compiler/scala/tools/nsc/typechecker/Infer.scala
index 0cb6aef48e..bad414fd78 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Infer.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Infer.scala
@@ -248,20 +248,17 @@ trait Infer {
}
}
- val patches = {
- val syms1 = typeRefs.collect(tp1)
- val syms2 = typeRefs.collect(tp2)
- for {
- sym1 <- syms1
- sym2 <- syms2
- if sym1 != sym2 && sym1.toString == sym2.toString
- } yield {
- val name = sym1.name
- explainName(sym1)
- explainName(sym2)
- if (sym1.owner == sym2.owner) sym2.name = newTypeName("(some other)"+sym2.name)
- (sym1, sym2, name)
- }
+ val patches = new ListBuffer[(Symbol, Symbol, Name)]
+ for {
+ t1 @ TypeRef(_, sym1, _) <- tp1
+ t2 @ TypeRef(_, sym2, _) <- tp2
+ if sym1 != sym2 && t1.toString == t2.toString
+ } {
+ val name = sym1.name
+ explainName(sym1)
+ explainName(sym2)
+ if (sym1.owner == sym2.owner) sym2.name = newTypeName("(some other)"+sym2.name)
+ patches += (sym1, sym2, name)
}
val result = op