Skip to content

Conversation

hamzaremmal
Copy link
Member

Starting from Scala 3.8.0, the following code will not compile due to removing some unsound typing rules. See scala/scala3#23441 for more details.

Starting from Scala 3.8.0, the following code will not compile due to removing some
unsound typing rules. See scala/scala3#23441

Co-authored-by: Eugene Flesselle <[email protected]>
@hamzaremmal
Copy link
Member Author

@SethTisue Can you please assign one of the maintainers as a reviewer for this PR. Thanks.

@SethTisue
Copy link
Member

review by @scala/collections ...?

* operation of `ParallelIterable` trait using the new `split` operation.
*/
trait ParSeqLike[+T, +CC[X] <: ParSeq[X], +Repr <: ParSeq[T], +Sequential <: scala.collection.Seq[T] with SeqOps[T, AnyConstr, Sequential]]
trait ParSeqLike[+T, +CC[X] <: ParSeq[X], +Repr <: ParSeq[T], +Sequential <: scala.collection.Seq[T] with SeqOps[T, collection.Seq, Sequential]]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not CC here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because we are putting constraints over the sequential type, not the parallel one.

Copy link
Member Author

@hamzaremmal hamzaremmal Sep 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, this is just the right signature to have since Seq expects to have at least a Seq there. Same is done for ParIterableLike:

trait ParIterableLike[+T, +CC[X] <: ParIterable[X], +Repr <: ParIterable[T], +Sequential <: Iterable[T] with IterableOps[T, Iterable, Sequential @uncheckedVariance]]

@hamzaremmal hamzaremmal requested a review from He-Pin September 28, 2025 13:33
Copy link

@He-Pin He-Pin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@hamzaremmal hamzaremmal merged commit 1134013 into main Sep 30, 2025
10 checks passed
@hamzaremmal hamzaremmal deleted the fix-distributivity branch September 30, 2025 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants