summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2013-06-09 12:38:48 -0700
committerJason Zaugg <jzaugg@gmail.com>2013-06-09 12:38:48 -0700
commit81faae23b5a6657710e56906ebf3f47fc391be59 (patch)
treed566fa7c7d2b1885fdc7712c299d817b7cc88c7a /test
parentea7cde1e33247160f42080c894e4c313a9cf52c3 (diff)
parentfcec27575659b75275b38687e81cb677b0a452aa (diff)
downloadscala-81faae23b5a6657710e56906ebf3f47fc391be59.tar.gz
scala-81faae23b5a6657710e56906ebf3f47fc391be59.tar.bz2
scala-81faae23b5a6657710e56906ebf3f47fc391be59.zip
Merge pull request #2610 from axel22/issue/7498
SI-7498 ParTrieMap.foreach no longer crashes
Diffstat (limited to 'test')
-rw-r--r--test/files/run/t7498.scala20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/files/run/t7498.scala b/test/files/run/t7498.scala
new file mode 100644
index 0000000000..1dbf0597e0
--- /dev/null
+++ b/test/files/run/t7498.scala
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+object Test extends App {
+ import scala.collection.concurrent.TrieMap
+
+ class Collision(val idx: Int) {
+ override def hashCode = idx % 10
+ }
+
+ val tm = TrieMap[Collision, Unit]()
+ for (i <- 0 until 1000) tm(new Collision(i)) = ()
+
+ tm.par.foreach(kv => ())
+}
+