From ecbe1cdd177b903796a65e29c6a2104197c54654 Mon Sep 17 00:00:00 2001 From: Adriaan Moors Date: Tue, 21 Aug 2007 08:28:46 +0000 Subject: forgot to replace the old symbols by the cloned... forgot to replace the old symbols by the cloned ones in the info's of the cloned symbols --- src/compiler/scala/tools/nsc/symtab/Types.scala | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/compiler/scala/tools/nsc/symtab/Types.scala b/src/compiler/scala/tools/nsc/symtab/Types.scala index abe0d183f9..60146af00f 100644 --- a/src/compiler/scala/tools/nsc/symtab/Types.scala +++ b/src/compiler/scala/tools/nsc/symtab/Types.scala @@ -2177,14 +2177,15 @@ A type's typeSymbol should never be inspected directly. def mapOver(origSyms: List[Symbol]): List[Symbol] = { val origInfos = origSyms map (_.info) val newInfos = List.mapConserve(origInfos)(this) - if (newInfos eq origInfos) origSyms // short path in case nothing changes due to map + if (newInfos eq origInfos) origSyms // fast path in case nothing changes due to map else { // map is not the identity --> do cloning properly val clonedSyms = origSyms map (_.cloneSymbol) - val clonedInfos = clonedSyms map (_.info) + val clonedInfos = clonedSyms map (_.info.substSym(origSyms, clonedSyms)) val transformedInfos = List.mapConserve(clonedInfos)(this) List.map2(clonedSyms, transformedInfos) { ((newSym, newInfo) => newSym.setInfo(newInfo)) } + clonedSyms } } -- cgit v1.2.3