Skip to content

Commit 7062b90

Browse files
committed
Avoid stale symbol errors for Scala-2 compiled symbols
Wehn compiling dotty repeatedly using dotc.Bench, we got a stale symbol error involving an outer field of a Scala class. These can always be assumed to be current, as we would not think to recompile Scala2 classes mixed with dotty classes in the same session (we'd need two concurrent compilers for that).
1 parent 75358be commit 7062b90

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/dotty/tools/dotc/core/SymDenotations.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ trait SymDenotations { this: Context =>
5656
stillValid(owner) && (
5757
!owner.isClass
5858
|| owner.isRefinementClass
59+
|| owner.is(Scala2x)
5960
|| (owner.unforcedDecls.lookupAll(denot.name) contains denot.symbol)
6061
|| denot.isSelfSym)
6162
} catch {

0 commit comments

Comments
 (0)