You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure if this is really a bug but atleast it seems like unintended consequence.
Using MyEnumeration.values.map(p => (p -> DoSomehtingWith(p)) causes diverging implicit expansion error.
This used to work on 2.8 and 2.9 and you can go around with MyEnumeration.values.toList.map but that seems strange and unnecessary.
@adriaanm said (edited on Aug 7, 2012 9:00:27 AM UTC):
This is a library issue, probably caused by scala/scala@2d0f82898d
newCanBuildFrom for SortedSet is competing with the normal canBuildFrom.
Since there's an easy workaround (add a toList) and unlikely to be the compiler's fault, lowering priority and re-assigning.
@szeiger said:
I wish I knew what's going on. This canBuildFrom stuff is a hack (overriding newCanBuildFrom in SortedSet) upon a hack (needing both canBuildFrom and newCanBuildFrom in the first place) and I don't fully understand the latter.
The reason for needing the SortedSet hack is that the standard canBuildFrom for SortedSets only works for sets with a user-specified ordering (even though SortedSet itself has no such requirement).
I think it's a legitimate bug that should be fixed but off the top of my head I can't think of a good solution that won't further complicate the implementation (with the risk of creating new bugs in slightly different situations).
Activity
scabug commentedon Mar 2, 2012
Imported From: https://issues.scala-lang.org/browse/SI-5534?orig=1
Reporter: Janne Sinivirta (vertti)
scabug commentedon Jul 17, 2012
@hubertp said:
Adriaan: Why is this not critical, since it is a regression?
scabug commentedon Aug 7, 2012
@adriaanm said (edited on Aug 7, 2012 9:00:27 AM UTC):
This is a library issue, probably caused by scala/scala@2d0f82898d
newCanBuildFrom for SortedSet is competing with the normal canBuildFrom.
Since there's an easy workaround (add a toList) and unlikely to be the compiler's fault, lowering priority and re-assigning.
scabug commentedon Aug 7, 2012
@adriaanm said:
the other workaround would be to provide an instance of Ordering at Entity:
since values is a SortedSet, that's needed for its canBuildFrom
Stefan, I think we can close, but I'll let you have a second look since you know in more detail what's going on.
scabug commentedon Aug 7, 2012
@szeiger said:
I wish I knew what's going on. This canBuildFrom stuff is a hack (overriding newCanBuildFrom in SortedSet) upon a hack (needing both canBuildFrom and newCanBuildFrom in the first place) and I don't fully understand the latter.
The reason for needing the SortedSet hack is that the standard canBuildFrom for SortedSets only works for sets with a user-specified ordering (even though SortedSet itself has no such requirement).
I think it's a legitimate bug that should be fixed but off the top of my head I can't think of a good solution that won't further complicate the implementation (with the risk of creating new bugs in slightly different situations).
scabug commentedon Jan 29, 2013
@retronym said:
Sounds like this needs a library change; we'll have to defer to 2.11 due to the forward binary compatibility regime.
scabug commentedon Oct 15, 2013
@gkossakowski said:
Unassigning and rescheduling to M7 as previous deadline was missed.