We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c864e11 commit 473c831Copy full SHA for 473c831
tests/pos/i996.scala
@@ -0,0 +1,15 @@
1
+package scala
2
+package collection
3
+package immutable
4
+
5
+import HashMap.{ HashTrieMap, HashMapCollision1, HashMap1 }
6
+import HashSet.{ HashTrieSet, HashSetCollision1, HashSet1 }
7
8
+object i996{
9
10
+ private[this] def collisionToArray[T](x: Iterable[T]): Array[Iterable[T]] = (x match {
11
+ case x: HashMapCollision1[_, _] => x.kvs.map(x => HashMap(x)).toArray
12
+ case x: HashSetCollision1[_] => x.ks.map(x => HashSet(x)).toArray
13
+ }).asInstanceOf[Array[Iterable[T]]]
14
15
+}
0 commit comments