-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
itype:bugregressionThis worked in a previous version but doesn't anymoreThis worked in a previous version but doesn't anymorestat:needs triageEvery issue needs to have an "area" and "itype" labelEvery issue needs to have an "area" and "itype" label
Description
Based on the OpenCB failure in sageserpent-open/kineticmerge
Compiler version
Last good release: 3.7.3-RC1-bin-20250717-fb66af2-NIGHTLY
First bad release: 3.7.3-RC1-bin-20250718-42fdd76-NIGHTLY
Bisect points to 45f7ef6 / #23532
Minimized code
// https://github.com/scala/scala-collection-contrib/blob/main/src/main/scala/scala/collection/decorators/package.scala
object decorators {
import scala.collection.generic.IsMap
class MapDecorator[C, M <: IsMap[C]](coll: C)(implicit val map: M)
implicit def mapDecorator[C](coll: C)(implicit map: IsMap[C]): MapDecorator[C, map.type] = ???
}
import decorators.mapDecorator // unused, required to reprouce
trait Eq[T]
trait Applicative[F[_]]
given Applicative[Option] = ???
trait Traverse[F[_]]:
// context bound required to reproduce
def traverse[G[_]: Applicative, A, B](fa: F[A])(f: A => G[B]): G[F[B]]
object Traverse:
def apply[F[_]]: Traverse[F] = ???
trait Segment[Element: Eq]:
def fuseWith(another: Segment[Element])(
elementFusion: (Element, Element) => Option[Element]
): Option[Segment[Element]] = ???
case class MergeResult[Element: Eq] private (segments: Seq[Segment[Element]]):
def fuseWith(another: MergeResult[Element])(
elementFusion: (Element, Element) => Option[Element]
): Option[MergeResult[Element]] =
if segments.size != another.segments.size then None
else
Traverse[Seq]
.traverse(segments.zip(another.segments))(_.fuseWith(_)(elementFusion))
.map(MergeResult.apply) // errorOutput
[error] No given instance of type Eq[Any] was found for a context parameter of method apply in object MergeResult
[error] .map(MergeResult.apply) // error
[error] ^Expectation
Should compile
Metadata
Metadata
Assignees
Labels
itype:bugregressionThis worked in a previous version but doesn't anymoreThis worked in a previous version but doesn't anymorestat:needs triageEvery issue needs to have an "area" and "itype" labelEvery issue needs to have an "area" and "itype" label