Skip to content

Commit aecbb4c

Browse files
committed
Don't exit with StaleSymbol errors when testing pickling.
Stale symbol errors can happen when inspecting symbols while comparing the trees before and after pickling.
1 parent 13da159 commit aecbb4c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,12 @@ trait SymDenotations { this: Context =>
102102
}
103103
}
104104

105-
/** Configurable: Accept stale symbol with warning if in IDE */
106-
def staleOK: Boolean = Config.ignoreStaleInIDE && mode.is(Mode.Interactive)
105+
/** Configurable: Accept stale symbol with warning if in IDE
106+
* Always accept stale symbols when testing pickling.
107+
*/
108+
def staleOK: Boolean =
109+
Config.ignoreStaleInIDE && mode.is(Mode.Interactive) ||
110+
settings.YtestPickler.value
107111

108112
/** Possibly accept stale symbol with warning if in IDE */
109113
def acceptStale(denot: SingleDenotation): Boolean =

0 commit comments

Comments
 (0)