summaryrefslogtreecommitdiff
path: root/src/library
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 /src/library
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 'src/library')
-rw-r--r--src/library/scala/collection/concurrent/TrieMap.scala7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/library/scala/collection/concurrent/TrieMap.scala b/src/library/scala/collection/concurrent/TrieMap.scala
index 0b5ceeb1c7..6632f30e51 100644
--- a/src/library/scala/collection/concurrent/TrieMap.scala
+++ b/src/library/scala/collection/concurrent/TrieMap.scala
@@ -1012,8 +1012,11 @@ private[collection] class TrieMapIterator[K, V](var level: Int, private var ct:
*/
protected def subdivide(): Seq[Iterator[(K, V)]] = if (subiter ne null) {
// the case where an LNode is being iterated
- val it = subiter
- subiter = null
+ val it = newIterator(level + 1, ct, _mustInit = false)
+ it.depth = -1
+ it.subiter = this.subiter
+ it.current = null
+ this.subiter = null
advance()
this.level += 1
Seq(it, this)