Skip to content

Commit 3a73ca8

Browse files
committed
Address review comments
1 parent 7ef0c6b commit 3a73ca8

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

library/src/scala/collection/convert/StreamExtensions.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ object StreamExtensions {
462462
implicit def anyAccumulatorFactoryInfo[A]: AccumulatorFactoryInfo[A, AnyAccumulator[A]] = anyAccumulatorFactoryInfoPrototype.asInstanceOf[AccumulatorFactoryInfo[A, AnyAccumulator[A]]]
463463

464464
private object anyAccumulatorFactoryInfoPrototype extends AccumulatorFactoryInfo[AnyRef, AnyAccumulator[AnyRef]] {
465-
val companion: AnyRef | Null = null
465+
val companion: AnyRef | Null = AnyAccumulator
466466
}
467467

468468
implicit val intAccumulatorFactoryInfo: AccumulatorFactoryInfo[Int, IntAccumulator] = new AccumulatorFactoryInfo[Int, IntAccumulator] {

library/src/scala/collection/immutable/RedBlackTree.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -839,7 +839,7 @@ private[collection] object RedBlackTree {
839839
stackOfNexts.nn(index)
840840
}
841841

842-
protected[this] val stackOfNexts: Array[Tree[A, B]] | Null = if (root eq null) null else {
842+
protected[this] val stackOfNexts: Array[Tree[A, B] | Null] | Null = if (root eq null) null else {
843843
/*
844844
* According to "Ralf Hinze. Constructing red-black trees" [https://www.cs.ox.ac.uk/ralf.hinze/publications/#P5]
845845
* the maximum height of a red-black tree is 2*log_2(n + 2) - 2.
@@ -850,7 +850,7 @@ private[collection] object RedBlackTree {
850850
* we potentially do so in `startFrom`.
851851
*/
852852
val maximumHeight = 2 * (32 - Integer.numberOfLeadingZeros(root.count + 2 - 1)) - 2
853-
new Array[Tree[A, B]](maximumHeight)
853+
new Array[Tree[A, B] | Null](maximumHeight)
854854
}
855855
private[this] var index = 0
856856
protected var lookahead: Tree[A, B] | Null = if (start.isDefined) startFrom(start.get) else findLeftMostOrPopOnEmpty(root)

library/src/scala/collection/mutable/RedBlackTree.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ private[collection] object RedBlackTree {
271271
else if (z.right eq null) {
272272
x = z.left
273273
transplant(tree, z, z.left)
274-
xParent = z.left.parent
274+
xParent = z.parent
275275
}
276276
else {
277277
y = minNodeNonNull(z.right)

0 commit comments

Comments
 (0)