Skip to content

.to(mutable.PriorityQueue) not compiling on 2.12 #247

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

Closed
fdietze opened this issue Sep 2, 2019 · 1 comment · Fixed by #249
Closed

.to(mutable.PriorityQueue) not compiling on 2.12 #247

fdietze opened this issue Sep 2, 2019 · 1 comment · Fixed by #249
Labels
good first issue Good for newcomers library Related to compat library code (not rewrite rules)

Comments

@fdietze
Copy link
Contributor

fdietze commented Sep 2, 2019

I'm porting Scala.rx to 2.13 (lihaoyi/scala.rx#138). It now compiles for 2.13, but not for 2.12 anymore (https://travis-ci.org/lihaoyi/scala.rx/builds/579881994?utm_source=github_status&utm_medium=notification):

[error]      type mismatch;
[error]       found   : scala.collection.mutable.PriorityQueue.type
[error]       required: scala.collection.generic.CanBuildFrom[Nothing,rx.Rx.Dynamic[_],scala.collection.mutable.PriorityQueue[rx.Rx.Dynamic[_]]]
[error]      L44:       args.iterator.flatMap(_.v.downStream).to(mutable.PriorityQueue),

Am I doing something wrong?

@julienrf
Copy link
Contributor

julienrf commented Sep 2, 2019

That’s our fault: https://scastie.scala-lang.org/wuOulN8JS2WQTIcveEtgLQ

We should add an implicit conversion to CanBuildFrom for companion objects extending GenericOrderedCompanion (we currently support GenericCompanion and SortedSetFactory only).

@julienrf julienrf added good first issue Good for newcomers library Related to compat library code (not rewrite rules) labels Sep 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers library Related to compat library code (not rewrite rules)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants