Skip to content

Commit a7d17e2

Browse files
committed
Fix scala#1812, Symbols.mapSymbols shouldn't force annotation transformation.
Reasoning similar to one in the previous commit also applies to annotations.
1 parent 3270404 commit a7d17e2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,7 @@ trait Symbols { this: Context =>
328328
// Note that this is a hack, but hack commonly used in Dotty
329329
// The same thing is done by other completers all the time
330330
denot.info = ttmap1.mapType(oinfo)
331+
denot.annotations = odenot.annotations.mapConserve(ttmap1.apply)
331332
}
332333
}
333334

@@ -337,7 +338,7 @@ trait Symbols { this: Context =>
337338
initFlags = odenot.flags &~ (Frozen | Touched) | Fresh,
338339
info = completer,
339340
privateWithin = ttmap1.mapOwner(odenot.privateWithin), // since this refers to outer symbols, need not include copies (from->to) in ownermap here.
340-
annotations = odenot.annotations.mapConserve(ttmap1.apply))
341+
annotations = odenot.annotations)
341342

342343
}
343344

0 commit comments

Comments
 (0)