Skip to content

Commit 8d34be7

Browse files
committed
Try workaround
1 parent 16031c4 commit 8d34be7

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

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

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -445,12 +445,22 @@ class Scala2Unpickler(bytes: Array[Byte], classRoot: ClassDenotation, moduleClas
445445
// Scala 2 sometimes pickle the same type parameter symbol multiple times
446446
// (see i11173 for an example), but we should only unpickle it once.
447447
|| tag == TYPEsym && flags.is(TypeParam) && symScope(owner).lookup(name.asTypeName).exists
448-
// We discard the private val representing a case accessor. We only load the case accessor def.
449-
|| flags.isAllOf(CaseAccessor| PrivateLocal, butNot = Method)
450448
then
451449
// skip this member
452450
return NoSymbol
453451

452+
if flags.isAllOf(CaseAccessor | PrivateLocal, butNot = Method)
453+
// If akka.actor.Terminated.actor is not loaded, we get "no member new scala.beans.BeanProperty . <init>".
454+
// ```
455+
// final case class Terminated private[akka] (@BeanProperty actor: ActorRef)(
456+
// @BeanProperty val existenceConfirmed: Boolean,
457+
// @BeanProperty val addressTerminated: Boolean)
458+
// ```
459+
&& !(owner.fullName.toString() == "akka.actor.Terminated" && name.toString == "actor ")
460+
then
461+
// We discard the private val representing a case accessor. We only load the case accessor def.
462+
return NoSymbol
463+
454464
// Adapt the flags of getters so they become like vals/vars instead.
455465
// The info of this symbol is adapted in the `LocalUnpickler`.
456466
if flags.isAllOf(Method | Accessor) && !name.toString().endsWith("_$eq") then

0 commit comments

Comments
 (0)