Skip to content

Commit 3e8d824

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

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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

Lines changed: 5 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

@@ -381,6 +382,9 @@ object Symbols {
381382
type ThisName <: Name
382383

383384
//assert(id != 4285)
385+
if (id == 25782) {
386+
println("dss")
387+
}
384388

385389
/** The last denotation of this symbol */
386390
private[this] var lastDenot: SymDenotation = _

0 commit comments

Comments
 (0)