Skip to content

Cyclic Reference Error when unpickling Scala2 sources #2391

Closed
@felixmulder

Description

@felixmulder
// User.scala
package foo

trait User {
  type Entry <: ChildContainer#Entry // error
}
// Containers.scala
package foo

trait ParentContainer {
  sealed trait Entry
}

class ChildContainer extends ParentContainer {
  trait LazyEntry extends Entry
}

Steps to Reproduce

  1. Compile both sources using scalac
  2. Compile "User.scala" using dotty

Notes

I tried a bunch of different variations to see what is the permutation that would trigger the unpickling exception. If I leave out sealed in ParentContainer#Entry, it compiles fine. I can use any combination of class/trait - but it seems to me that it is the sealed portion that kills the unpickler.

Ping @odersky, @smarter

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions