Skip to content

Commit 8617d68

Browse files
committed
add explanation in TupleXXL for toString and hashCode`
1 parent 1f7c1aa commit 8617d68

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

library/src/scala/runtime/TupleXXL.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,13 @@ final class TupleXXL private (es: IArray[Object]) extends Product {
99
def productArity: Int = es.length
1010
override def productPrefix: String = "Tuple"
1111

12+
// NOTE: For historical reasons, we cannot change this method
13+
// to `def toString(): String`. See #24461 for more informations.
1214
override def toString: String =
1315
elems.asInstanceOf[Array[Object]].mkString("(", ",", ")")
1416

17+
// NOTE: For historical reasons, we cannot change this method
18+
// to `def hashCode(): Int`. See #24461 for more informations.
1519
override def hashCode: Int =
1620
scala.runtime.ScalaRunTime._hashCode(this)
1721

0 commit comments

Comments
 (0)