Skip to content

Commit f9550c6

Browse files
committed
[nomaster] Revert "Fixes SI-6521, overrides Range#head to be faster"
This reverts commit a557a97. This is necessary to maintain binary compatibility with 2.10.0. Mima says: matchName="scala.collection.immutable.Range.head" problemName=IncompatibleResultTypeProblem The bridge method appeared because result is now Int, whereas the super-method's result type erases to Object
1 parent af0da51 commit f9550c6

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

bincompat-forward.whitelist.conf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ filter {
2121
problemName=MissingMethodProblem
2222
},
2323
# TODO: revert a557a97360: bridge method appeared because result is now Int but the super-method's result type erases to Object
24-
{
25-
matchName="scala.collection.immutable.Range.head"
26-
problemName=IncompatibleResultTypeProblem
27-
},
24+
# {
25+
# matchName="scala.collection.immutable.Range.head"
26+
# problemName=IncompatibleResultTypeProblem
27+
# },
2828
# TODO: revert 0b92073a38 2aa66bec86: SI-4664 [Make scala.util.Random Serializable] Add test case
2929
{
3030
matchName="scala.util.Random"

src/library/scala/collection/immutable/Range.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ extends scala.collection.AbstractSeq[Int]
7777
final val terminalElement = start + numRangeElements * step
7878

7979
override def last = if (isEmpty) Nil.last else lastElement
80-
override def head = if (isEmpty) Nil.head else start
8180

8281
override def min[A1 >: Int](implicit ord: Ordering[A1]): Int =
8382
if (ord eq Ordering.Int) {

0 commit comments

Comments
 (0)