File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
compiler/src/dotty/tools/dotc/ast Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -185,11 +185,11 @@ class TreeTypeMap(
185
185
* and mapped symbols `mapped`. Also goes into mapped classes
186
186
* and substitutes their declarations.
187
187
*/
188
- def withMappedSyms (syms : List [Symbol ], mapped : List [Symbol ]): TreeTypeMap = {
188
+ def withMappedSyms (syms : List [Symbol ], mapped : List [Symbol ]): TreeTypeMap =
189
189
val symsChanged = syms ne mapped
190
190
val substMap = withSubstitution(syms, mapped)
191
191
lazy val origCls = mapped.zip(syms).filter(_._1.isClass).toMap
192
- val fullMap = mapped.filter(_.isClass).foldLeft(substMap) { (tmap, cls) =>
192
+ mapped.filter(_.isClass).foldLeft(substMap) { (tmap, cls) =>
193
193
val origDcls = cls.info.decls.toList.filterNot(_.is(TypeParam ))
194
194
val mappedDcls = mapSymbols(origDcls, tmap)
195
195
val tmap1 = tmap.withMappedSyms(
@@ -199,7 +199,4 @@ class TreeTypeMap(
199
199
origDcls.lazyZip(mappedDcls).foreach(cls.asClass.replace)
200
200
tmap1
201
201
}
202
- if symsChanged || (fullMap eq substMap) then fullMap
203
- else withMappedSyms(syms, mapAlways = true )
204
- }
205
202
}
You can’t perform that action at this time.
0 commit comments