diff options
author | Martin Odersky <odersky@gmail.com> | 2006-07-11 14:09:30 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2006-07-11 14:09:30 +0000 |
commit | 047b0657af7383c535d0f1d4c618a166b5237d8c (patch) | |
tree | f2af791afda229fbd69d976afb2f9ad63d1b785e | |
parent | 7632879f2c853cfa3efe05db8560fc605c595907 (diff) | |
download | scala-047b0657af7383c535d0f1d4c618a166b5237d8c.tar.gz scala-047b0657af7383c535d0f1d4c618a166b5237d8c.tar.bz2 scala-047b0657af7383c535d0f1d4c618a166b5237d8c.zip |
fixed bug652
-rw-r--r-- | src/compiler/scala/tools/nsc/symtab/Types.scala | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/Types.scala b/src/compiler/scala/tools/nsc/symtab/Types.scala index 02116df34f..e36fffbff4 100644 --- a/src/compiler/scala/tools/nsc/symtab/Types.scala +++ b/src/compiler/scala/tools/nsc/symtab/Types.scala @@ -341,7 +341,7 @@ trait Types requires SymbolTable { val this1 = adaptToNewRunMap(this) if (this1 eq this) sym.validTo = period(currentRunId, phaseId(sym.validTo)) else { - //System.out.println("new type of " + sym + "=" + this1);//DEBUG + //System.out.println("new type of " + sym + "=" + this1 + ", used to be " + this);//debug sym.setInfo(this1) } } @@ -1462,9 +1462,12 @@ trait Types requires SymbolTable { else if ((pre eq NoPrefix) || (pre eq NoType) || sym.owner.isPackageClass) sym else { var rebind0 = pre.member(sym.name) - if (sym.owner.name != rebind0.owner.name) { + /** The two symbols have the same fully qualified name */ + def corresponds(sym1: Symbol, sym2: Symbol): boolean = + sym1.name == sym2.name && (sym1.isPackageClass || corresponds(sym1.owner, sym2.owner)) + if (!corresponds(sym.owner, rebind0.owner)) { if (settings.debug.value) Console.println("ADAPT1 pre = "+pre+", sym = "+sym+sym.locationString+", rebind = "+rebind0+rebind0.locationString) - val bcs = pre.baseClasses.dropWhile(bc => bc.name != sym.owner.name); + val bcs = pre.baseClasses.dropWhile(bc => !corresponds(bc, sym.owner)); assert(!bcs.isEmpty) rebind0 = pre.baseType(bcs.head).member(sym.name) if (settings.debug.value) Console.println("ADAPT2 pre = "+pre+", sym = "+sym+sym.locationString+", rebind = "+rebind0+rebind0.locationString) |