File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -1563,8 +1563,14 @@ object Types {
1563
1563
case _ => if (denotationIsCurrent) lastDenotation.symbol else NoSymbol
1564
1564
}
1565
1565
1566
- override protected [Types ] def stableInRunSymbol (implicit ctx : Context ): Symbol =
1567
- currentSymbol // ### todo: drop
1566
+ /** Retrieves currently valid symbol without necessarily updating denotation.
1567
+ * Assumes that symbols do not change between periods in the same run.
1568
+ * Used to get the class underlying a ThisType.
1569
+ */
1570
+ override protected [Types ] def stableInRunSymbol (implicit ctx : Context ): Symbol = {
1571
+ if (checkedPeriod.runId == ctx.runId) lastSymbol
1572
+ else symbol
1573
+ }
1568
1574
1569
1575
private def lastKnownSymbol =
1570
1576
if (lastDenotation != null ) lastDenotation.symbol else NoSymbol
You can’t perform that action at this time.
0 commit comments