Skip to content

Commit 4d1ced0

Browse files
committed
Avoided relying on class symbols of primitive value types during unpickling. They might not be initialized yet (as seen during bootstrapped tests).
1 parent ee2b4c8 commit 4d1ced0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

compiler/src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -420,8 +420,7 @@ class Scala2Unpickler(bytes: Array[Byte], classRoot: ClassDenotation, moduleClas
420420
// TODO(gsps): This is a hack to mark certain primitive methods as stable.
421421
// In the future such primitive methods should be pickled with the Stable flag set.
422422
def markPrimitiveStable(owner: Symbol, name: Name, flags: FlagSet): FlagSet =
423-
if (defn.ScalaValueClasses().contains(owner)) flags | Stable
424-
else flags
423+
if (tpnme.ScalaValueNames.contains(defn.scalaClassName(owner))) flags | Stable else flags
425424

426425
tag match {
427426
case NONEsym => return NoSymbol

0 commit comments

Comments
 (0)