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
Because of the Col[A] it's not possible to use to in order to create a Map[Int, Int]. We should guard for similar types: BitSet, SortedMap, etc and convert to the expected type.
We should not produce .to(Map).toMap. Just .toMap is enough. But there will be no .toXxx methods for BitSet or SortedMap… Those cases can not be rewritten.
Currently, the rewrite will do the following patch
This gives a type error since the
to
function returns anIterable[(Int, Int)]
.The signature of .to[X] is
https://github.com/scala/scala/blob/90c94cc2ead0b7b1d9ba170da08d27504b2f0fa8/src/library/scala/collection/GenTraversableOnce.scala#L668
Because of the
Col[A]
it's not possible to use to in order to create aMap[Int, Int]
. We should guard for similar types:BitSet
,SortedMap
, etc and convert to the expected type.The text was updated successfully, but these errors were encountered: