File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -1175,8 +1175,15 @@ object Types {
1175
1175
case d =>
1176
1176
if (d.validFor.runId != ctx.period.runId)
1177
1177
loadDenot
1178
- else if (ctx.erasedTypes && lastSymbol != null )
1179
- denotOfSym(lastSymbol) // avoid keeping non-sym denotations after erasure; they violate the assertErased contract
1178
+ // The following branch was used to avoid an assertErased error.
1179
+ // It's idea was to void keeping non-sym denotations after erasure
1180
+ // since they violate the assertErased contract. But the problem is
1181
+ // that when seen again in an earlier phase the denotation is
1182
+ // still seen as a SymDenotation, whereas it should be a SingleDenotation.
1183
+ // That's why the branch is disabled.
1184
+ //
1185
+ // else if (ctx.erasedTypes && lastSymbol != null)
1186
+ // denotOfSym(lastSymbol)
1180
1187
else
1181
1188
d.current
1182
1189
}
Original file line number Diff line number Diff line change @@ -94,7 +94,8 @@ class Erasure extends Phase with DenotTransformer { thisTransformer =>
94
94
if (ctx.mode.isExpr)
95
95
tree.tpe match {
96
96
case ref : TermRef =>
97
- assert(ref.denot.isInstanceOf [SymDenotation ],
97
+ assert(ref.denot.isInstanceOf [SymDenotation ] ||
98
+ ref.denot.isInstanceOf [UniqueRefDenotation ],
98
99
i " non-sym type $ref of class ${ref.getClass} with denot of class ${ref.denot.getClass} of $tree" )
99
100
case _ =>
100
101
}
You can’t perform that action at this time.
0 commit comments