Skip to content

Commit 3b46af1

Browse files
committed
Accept stale Predef symbol
Otherwise we'd get a "stale symbol error" when compiling stdLib in the community build.
1 parent f71b5e7 commit 3b46af1

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Diff for: compiler/src/dotty/tools/dotc/core/SymDenotations.scala

+6-4
Original file line numberDiff line numberDiff line change
@@ -2457,10 +2457,12 @@ object SymDenotations {
24572457

24582458
/** Possibly accept stale symbol with warning if in IDE */
24592459
def acceptStale(denot: SingleDenotation)(using Context): Boolean =
2460-
staleOK && {
2461-
report.debugwarn(denot.staleSymbolMsg)
2462-
true
2463-
}
2460+
denot.symbol.sourceModule == defn.ScalaPredefModule
2461+
|| staleOK
2462+
&& {
2463+
report.debugwarn(denot.staleSymbolMsg)
2464+
true
2465+
}
24642466

24652467
// ---- Completion --------------------------------------------------------
24662468

0 commit comments

Comments
 (0)