diff options
author | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2015-12-20 17:12:13 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2015-12-21 11:25:57 +0100 |
commit | 5a8675b76e1b7bed1b21cfdde211ffd89063eb9a (patch) | |
tree | 57aa3524045fbb2ba03345dbeb9c793303703fec /tests | |
parent | 513312450fddff94371f6ca0afd2524e2a17eed9 (diff) | |
download | dotty-5a8675b76e1b7bed1b21cfdde211ffd89063eb9a.tar.gz dotty-5a8675b76e1b7bed1b21cfdde211ffd89063eb9a.tar.bz2 dotty-5a8675b76e1b7bed1b21cfdde211ffd89063eb9a.zip |
Fix erasure of raw arrays
Diffstat (limited to 'tests')
-rw-r--r-- | tests/pos/i966.scala | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/pos/i966.scala b/tests/pos/i966.scala new file mode 100644 index 000000000..1fedc0023 --- /dev/null +++ b/tests/pos/i966.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]]] + +} |