diff --git a/compiler/src/dotty/tools/dotc/core/tasty/TreePickler.scala b/compiler/src/dotty/tools/dotc/core/tasty/TreePickler.scala index 0ee7fe15f32d..22dd18519453 100644 --- a/compiler/src/dotty/tools/dotc/core/tasty/TreePickler.scala +++ b/compiler/src/dotty/tools/dotc/core/tasty/TreePickler.scala @@ -343,6 +343,11 @@ class TreePickler(pickler: TastyPickler) { case _ if tpt.isType => pickleTpt(tpt) } pickleTreeUnlessEmpty(rhs) + mdef match + case _: ValDef if !sym.is(StableRealizable) => + // deterministically set the StableRealizable flag before committing to TASTy. + CheckRealizable.realizability(sym.termRef) + case _ => pickleModifiers(sym, mdef) } for