Skip to content

Cyclic Reference Error when unpickling Scala2 sources #2391

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
felixmulder opened this issue May 8, 2017 · 0 comments
Closed

Cyclic Reference Error when unpickling Scala2 sources #2391

felixmulder opened this issue May 8, 2017 · 0 comments

Comments

@felixmulder
Copy link
Contributor

felixmulder commented May 8, 2017

// 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

felixmulder added a commit to dotty-staging/dotty that referenced this issue May 8, 2017
felixmulder added a commit that referenced this issue May 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant