Skip to content

Commit 17476c2

Browse files
committed
Fix TreeTypeMap and mapSymbols to create a copy of decls for duplicated classes.
Without this fix the duplicated classes and the original ones share the same reference to a scope, instead of having each a separate one. @AlexSikia this should fix your problems
1 parent 2362081 commit 17476c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/dotty/tools/dotc/core/Symbols.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ trait Symbols { this: Context =>
292292
val oinfo = original.info match {
293293
case ClassInfo(pre, _, parents, decls, selfInfo) =>
294294
assert(original.isClass)
295-
ClassInfo(pre, copy.asClass, parents, decls, selfInfo)
295+
ClassInfo(pre, copy.asClass, parents, decls.cloneScope, selfInfo)
296296
case oinfo => oinfo
297297
}
298298
copy.denot = odenot.copySymDenotation(

0 commit comments

Comments
 (0)