diff options
Diffstat (limited to 'tests/run/t7498.scala')
-rw-r--r-- | tests/run/t7498.scala | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/run/t7498.scala b/tests/run/t7498.scala new file mode 100644 index 000000000..cab598405 --- /dev/null +++ b/tests/run/t7498.scala @@ -0,0 +1,20 @@ + + + + + + + +object Test extends dotty.runtime.LegacyApp { + 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 => ()) +} + |