Skip to content

Regression in typer #22724

Closed
Closed
@WojciechMazur

Description

@WojciechMazur

Based on OpenCB failures in multiple projects. For all of these the bisect was pointing to #21744 528d0f0

Related to #22713 but differs in the commit of bisect result commit

Project Name Version Build Logs Notes
lichess-org/lila HEAD Open CB logs Needs minimization
darrenjw/scala-smfsb 1.1 Open CB logs Reproduction below
etorreborre/specs2 5.5.8 Open CB logs Needs minimization
purplekingdomgames/ultraviolet 0.4.0 Open CB logs Needs minimization
martinhh/scalacheck-derived 0.6.0 -> 0.7.0 Open CB logs Needs minimization
zio/zio 2.1.15 -> 2.1.16 Open CB logs Reproducer below

Compiler version

3.7.0-NIGHTLY

Minimized code

//> using dep org.scala-lang.modules::scala-parallel-collections:1.2.0

import scala.collection.parallel.immutable.ParVector
import scala.collection.parallel.CollectionConverters._

case class PMatrix[T](x: Int, data: ParVector[T]):
  def coflatMap[S](f: PMatrix[T] => S): PMatrix[S] =
    PMatrix(
      x,
      (0 until x).toVector.par.map(i => f(PMatrix(x, data)))
    )

object PMatrix:
  def apply[T](r: Int, c: Int, data: Seq[T]): PMatrix[T] = ???

Output

Compiling project (Scala 3.7.0-RC1-bin-20250304-bef520f-NIGHTLY, JVM (17))
[error] ./test.scala:10:54
[error] Found:    (PMatrix.this.data : scala.collection.parallel.immutable.ParVector[T])
[error] Required: Int
[error]       (0 until x).toVector.par.map(i => f(PMatrix(x, data)))
[error]                                                      

Expectation

Should compile

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions