Skip to content

Commit 3303deb

Browse files
committed
fix: stabilise Predef.runtimeChecked too
1 parent afbb66b commit 3303deb

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

library/src/scala/Predef.scala

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -286,12 +286,12 @@ object Predef extends LowPriorityImplicits {
286286
to be available at runtime.
287287
To achieve this, we keep the Scala 3 signature publicly available.
288288
We rely on the fact that it is `inline` and will not be visible in the bytecode.
289-
To add the required Scala 2 ones, we define the `scala2Assert`, we use:
290-
- `@targetName` to swap the name in the generated code to `assert`
289+
To add the required Scala 2 ones, we define the `scala2Assert`, we use:
290+
- `@targetName` to swap the name in the generated code to `assert`
291291
- `@publicInBinary` to make it available during runtime.
292292
As such, we would successfully hijack the definitions of `assert` such as:
293293
- At compile time, we would have the definitions of `assert`
294-
- At runtime, the definitions of `scala2Assert` as `assert`
294+
- At runtime, the definitions of `scala2Assert` as `assert`
295295
NOTE: Tasty-Reader in Scala 2 will have to learn about this swapping if we are to
296296
allow loading the full Scala 3 library by it.
297297
*/
@@ -426,7 +426,7 @@ object Predef extends LowPriorityImplicits {
426426
@inline def formatted(fmtstr: String): String = fmtstr format self
427427
}
428428

429-
/** Injects String concatenation operator `+` to any classes.
429+
/** Injects String concatenation operator `+` to any classes.
430430
* @group implicit-classes-any
431431
*/
432432
@(deprecated @companionMethod)("Implicit injection of + is deprecated. Convert to String to call +", "2.13.0")
@@ -622,7 +622,6 @@ object Predef extends LowPriorityImplicits {
622622
* val y :: ys = xs.runtimeChecked // `_ :: _` can be checked at runtime, so no warning
623623
* }}}
624624
*/
625-
@experimental
626625
inline def runtimeChecked: x.type @RuntimeChecked = x: @RuntimeChecked
627626

628627
}

0 commit comments

Comments
 (0)