Skip to content

Pickling diff error for valid code #22826

@ivan-klass

Description

@ivan-klass

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

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