From 17476c22aa69d05ebf7701f23891f65329d35da7 Mon Sep 17 00:00:00 2001 From: Dmitry Petrashko Date: Thu, 2 Apr 2015 15:37:12 +0200 Subject: 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 --- src/dotty/tools/dotc/core/Symbols.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/dotty/tools/dotc/core/Symbols.scala') diff --git a/src/dotty/tools/dotc/core/Symbols.scala b/src/dotty/tools/dotc/core/Symbols.scala index a27ce3d6a..3b8d226be 100644 --- a/src/dotty/tools/dotc/core/Symbols.scala +++ b/src/dotty/tools/dotc/core/Symbols.scala @@ -292,7 +292,7 @@ trait Symbols { this: Context => val oinfo = original.info match { case ClassInfo(pre, _, parents, decls, selfInfo) => assert(original.isClass) - ClassInfo(pre, copy.asClass, parents, decls, selfInfo) + ClassInfo(pre, copy.asClass, parents, decls.cloneScope, selfInfo) case oinfo => oinfo } copy.denot = odenot.copySymDenotation( -- cgit v1.2.3