Skip to content
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

Pickling diff error for valid code #22826

Open
ivan-klass opened this issue Mar 17, 2025 · 0 comments
Open

Pickling diff error for valid code #22826

ivan-klass opened this issue Mar 17, 2025 · 0 comments

Comments

@ivan-klass
Copy link

Compiler version

3.7.0-RC1-SNAPSHOT, 8fe16fe
Found in #22824 (tests were green before moving from tests/run-deep-subtype to tests/run which seems to be used for pickling tests)

Minimized code

object Test {

  type Tup = (Int, Double, Boolean, String)

  val firstTruthy: [T <: Tuple.Union[Tup]] => Seq[T] => Option[T] = [T <: Tuple.Union[Tup]] => (seq: Seq[T]) => seq.find {
      case x: Int => x != 0
      case x: Double => x != 0.0
      case x: Boolean => x
      case x: String => x.nonEmpty
  }
}

Output

diff before-pickling.txt after-pickling.txt is

124,125c124,125
<       :[T <: scala.Int | scala.Double | (scala.Boolean | String)] => (seq: Seq[T]) => scala.Option[T]>@
<         tests/run/Tuple-mapKind.scala<128..309>
---
>       :[T <: scala.Tuple.Fold[(scala.Int, scala.Double, scala.Boolean, String), scala.Nothing, [x, y] =>> x | y]] => (
>         seq: Seq[T]) => scala.Option[T]>@tests/run/Tuple-mapKind.scala<128..309>

Expectation

No pickling diff error, same representation before and after

@ivan-klass ivan-klass added itype:bug stat:needs triage Every issue needs to have an "area" and "itype" label labels Mar 17, 2025
@Gedochao Gedochao added area:pickling and removed stat:needs triage Every issue needs to have an "area" and "itype" label labels Mar 18, 2025
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