diff options
author | Adriaan Moors <adriaan.moors@epfl.ch> | 2007-08-21 08:28:46 +0000 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@epfl.ch> | 2007-08-21 08:28:46 +0000 |
commit | ecbe1cdd177b903796a65e29c6a2104197c54654 (patch) | |
tree | 824f5a64c325a944bbb8d1b9969249118a33b1ee /src | |
parent | f8b2b21050e7a2ca0f537ef70e3e0c8eead43abc (diff) | |
download | scala-ecbe1cdd177b903796a65e29c6a2104197c54654.tar.gz scala-ecbe1cdd177b903796a65e29c6a2104197c54654.tar.bz2 scala-ecbe1cdd177b903796a65e29c6a2104197c54654.zip |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/symtab/Types.scala | 5 |
1 files 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 } } |