From b08821c4dfbf603adddbc978821db9a09878c597 Mon Sep 17 00:00:00 2001 From: Jamie Thompson Date: Mon, 22 Mar 2021 14:58:55 +0100 Subject: [PATCH] fix #9276: check valdef is realizable at pickler --- compiler/src/dotty/tools/dotc/core/tasty/TreePickler.scala | 5 +++++ 1 file changed, 5 insertions(+) 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