Skip to content

Commit e858d29

Browse files
authored
Merge pull request #13778 from dotty-staging/add-missing-experimental-annotation
Add missing `@experimental` in `Tuples`
2 parents faf9538 + 267b7f4 commit e858d29

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

library/src/scala/runtime/Tuples.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package scala.runtime
22

3+
import scala.annotation.experimental
4+
35
object Tuples {
46

57
inline val MaxSpecialized = 22
@@ -422,11 +424,13 @@ object Tuples {
422424
}
423425
}
424426

427+
@experimental
425428
def init(self: NonEmptyTuple): Tuple = (self: Any) match {
426429
case xxl: TupleXXL => xxlInit(xxl)
427430
case _ => specialCaseInit(self)
428431
}
429432

433+
@experimental
430434
def last(self: NonEmptyTuple): Any = (self: Any) match {
431435
case self: Product => self.productElement(self.productArity - 1)
432436
}

project/MiMaFilters.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import com.typesafe.tools.mima.core.ProblemFilters._
44

55
object MiMaFilters {
66
val Library: Seq[ProblemFilter] = Seq(
7+
// Experimental APIs that can be added in 3.2.0
78
ProblemFilters.exclude[DirectMissingMethodProblem]("scala.runtime.Tuples.init"),
89
ProblemFilters.exclude[DirectMissingMethodProblem]("scala.runtime.Tuples.last")
910
)

0 commit comments

Comments
 (0)