diff options
Diffstat (limited to 'tests/pos')
-rw-r--r-- | tests/pos/i996.scala | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/pos/i996.scala b/tests/pos/i996.scala new file mode 100644 index 000000000..1fedc0023 --- /dev/null +++ b/tests/pos/i996.scala @@ -0,0 +1,15 @@ +package scala +package collection +package immutable + +import HashMap.{ HashTrieMap, HashMapCollision1, HashMap1 } +import HashSet.{ HashTrieSet, HashSetCollision1, HashSet1 } + +object i996{ + + private[this] def collisionToArray[T](x: Iterable[T]): Array[Iterable[T]] = (x match { + case x: HashMapCollision1[_, _] => x.kvs.map(x => HashMap(x)).toArray + case x: HashSetCollision1[_] => x.ks.map(x => HashSet(x)).toArray + }).asInstanceOf[Array[Iterable[T]]] + +} |