From 0f52abe3c9e0ddc62fff62bf30949d199d33e69e 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 | 3 +++ 1 file changed, 3 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..a54940ac41f6 100644 --- a/compiler/src/dotty/tools/dotc/core/tasty/TreePickler.scala +++ b/compiler/src/dotty/tools/dotc/core/tasty/TreePickler.scala @@ -343,6 +343,9 @@ class TreePickler(pickler: TastyPickler) { case _ if tpt.isType => pickleTpt(tpt) } pickleTreeUnlessEmpty(rhs) + mdef match + case _: ValDef if !sym.is(StableRealizable) => CheckRealizable.realizability(sym.termRef) + case _ => pickleModifiers(sym, mdef) } for