Skip to content

Match type pickling test failure #13614

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

Open
OlivierBlanvillain opened this issue Sep 27, 2021 · 1 comment
Open

Match type pickling test failure #13614

OlivierBlanvillain opened this issue Sep 27, 2021 · 1 comment

Comments

@OlivierBlanvillain
Copy link
Contributor

The following fails to pass the pickling tests:

object Test {
  type M[X] = X match { case Int => String }
  def a: Any { type Out = M[Int] } = a
}

(minimized from #13585)

The failure comes from the refinement type, which is printed as
scala.Any{Out = scala.String} before pickling, and
scala.Any{Out = Test.M[scala.Int]} after pickling.

@dwijnand
Copy link
Member

I think the change in #14506 affects this. Type simplifies and overrides the type. So not doing so in unpickling is going to make the tree have different types. We need to either continue to do it, or do it while comparing the types. (That PR post-dates this issue, so I think the simplify wasn't there initially, then it was there, then it was removed - so the issue is still present.)

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

2 participants