Skip to content

Commit 55c7a4a

Browse files
committed
Make definitions used in capture checking again @experimental
#16199 dropped their experimental status to allow experimenting with compiling the compiler under -Ycc, but that was meant as a local change that should not have been propagated to main.
1 parent 3381850 commit 55c7a4a

File tree

4 files changed

+6
-8
lines changed

4 files changed

+6
-8
lines changed

library/src/scala/annotation/retains.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ package scala.annotation
1111
* The annotation can also be written explicitly if one wants to avoid the
1212
* non-standard capturing type syntax.
1313
*/
14-
// @experimental // suppressed so we can use in compiler
14+
@experimental
1515
class retains(xs: Any*) extends annotation.StaticAnnotation
1616

17-
// @experimental // suppressed so we can use in compiler
17+
@experimental
1818
class retainsUniversal extends annotation.StaticAnnotation

library/src/scala/caps.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package scala
22

33
import annotation.experimental
44

5-
// @experimental , suppress @experimental so we can use in compiler itself
5+
@experimental
66
object caps:
77

88
/** If argument is of type `cs T`, converts to type `box cs T`. This

project/MiMaFilters.scala

-4
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,5 @@ import com.typesafe.tools.mima.core._
44
object MiMaFilters {
55
val Library: Seq[ProblemFilter] = Seq(
66
ProblemFilters.exclude[MissingClassProblem]("scala.annotation.internal.MappedAlternative"),
7-
ProblemFilters.exclude[MissingClassProblem]("scala.caps"),
8-
ProblemFilters.exclude[MissingClassProblem]("scala.caps$"),
9-
ProblemFilters.exclude[MissingClassProblem]("scala.annotation.retains"),
10-
ProblemFilters.exclude[MissingClassProblem]("scala.annotation.retainsUniversal"),
117
)
128
}

tests/run-custom-args/tasty-inspector/stdlibExperimentalDefinitions.scala

+3-1
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,10 @@ val experimentalDefinitionInLibrary = Set(
5050
"scala.annotation.capability",
5151
"scala.annotation.internal.CaptureChecked",
5252
"scala.annotation.internal.requiresCapability",
53-
//"scala.annotation.retains",
53+
"scala.annotation.retains",
54+
"scala.annotation.retainsUniversal",
5455
"scala.annotation.retainsByName",
56+
"scala.caps",
5557

5658
//// New APIs: Mirror
5759
// Can be stabilized in 3.3.0 or later.

0 commit comments

Comments
 (0)