Skip to content

Commit 14e0f72

Browse files
committed
Fix #443, set moduleClass of class being lazily unpickled.
1 parent fdc92a6 commit 14e0f72

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/dotty/tools/dotc/core/pickling/UnPickler.scala

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,11 @@ class UnPickler(bytes: Array[Byte], classRoot: ClassDenotation, moduleClassRoot:
495495
if (isModuleRoot) {
496496
moduleRoot setFlag flags
497497
moduleRoot.symbol
498-
} else ctx.newSymbol(owner, name.asTermName, flags, localMemberUnpickler, coord = start)
498+
} else ctx.newSymbol(owner, name.asTermName, flags,
499+
new LocalUnpickler() withModuleClass(implicit ctx =>
500+
owner.info.decls.lookup(name.moduleClassName)
501+
.suchThat(_ is Module).symbol)
502+
, coord = start)
499503
case _ =>
500504
errorBadSignature("bad symbol tag: " + tag)
501505
})

0 commit comments

Comments
 (0)