From a7d17e286760879a35dfaeeadca1dbad2aa85dfc Mon Sep 17 00:00:00 2001 From: Dmitry Petrashko Date: Mon, 19 Dec 2016 17:12:12 +0100 Subject: Fix #1812, Symbols.mapSymbols shouldn't force annotation transformation. Reasoning similar to one in the previous commit also applies to annotations. --- compiler/src/dotty/tools/dotc/core/Symbols.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'compiler/src/dotty') diff --git a/compiler/src/dotty/tools/dotc/core/Symbols.scala b/compiler/src/dotty/tools/dotc/core/Symbols.scala index c475e99f5..e0117300a 100644 --- a/compiler/src/dotty/tools/dotc/core/Symbols.scala +++ b/compiler/src/dotty/tools/dotc/core/Symbols.scala @@ -328,6 +328,7 @@ trait Symbols { this: Context => // Note that this is a hack, but hack commonly used in Dotty // The same thing is done by other completers all the time denot.info = ttmap1.mapType(oinfo) + denot.annotations = odenot.annotations.mapConserve(ttmap1.apply) } } @@ -337,7 +338,7 @@ trait Symbols { this: Context => initFlags = odenot.flags &~ (Frozen | Touched) | Fresh, info = completer, privateWithin = ttmap1.mapOwner(odenot.privateWithin), // since this refers to outer symbols, need not include copies (from->to) in ownermap here. - annotations = odenot.annotations.mapConserve(ttmap1.apply)) + annotations = odenot.annotations) } -- cgit v1.2.3