Skip to content

Commit 23a00cb

Browse files
committed
Add capture checking to various scala.* base package files
Just imports
1 parent 832213b commit 23a00cb

File tree

10 files changed

+21
-0
lines changed

10 files changed

+21
-0
lines changed

library/src/scala/CanEqual.scala

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

3+
import language.experimental.captureChecking
4+
35
import annotation.implicitNotFound
46
import scala.collection.{Seq, Set, Map}
57

library/src/scala/CanThrow.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ package scala
22
import language.experimental.erasedDefinitions
33
import annotation.{implicitNotFound, experimental, capability}
44

5+
import language.experimental.captureChecking
6+
57
/** A capability class that allows to throw exception `E`. When used with the
68
* experimental.saferExceptions feature, a `throw Ex()` expression will require
79
* a given of class `CanThrow[Ex]` to be available.

library/src/scala/Conversion.scala

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

3+
import language.experimental.captureChecking
4+
35
/** A class for implicit values that can serve as implicit conversions.
46
* The implicit resolution algorithm will act as if there existed
57
* the additional implicit definition:

library/src/scala/NamedTuple.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package scala
22
import compiletime.ops.boolean.*
33

4+
import language.experimental.captureChecking
5+
46
object NamedTuple:
57

68
/** The type to which named tuples get mapped to. For instance,

library/src/scala/PolyFunction.scala

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

3+
import language.experimental.captureChecking
4+
35
/* (EXPERIMENTAL) NEW DOCUMENTATION: This should be used when we stabilize erased definitions or other generalize other function types.
46
*
57
* Marker trait for many (poly) function types.

library/src/scala/Precise.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
package scala
2+
3+
import language.experimental.captureChecking
4+
25
import annotation.experimental
36
import language.experimental.erasedDefinitions
47

library/src/scala/Pure.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
package scala
2+
3+
import language.experimental.captureChecking
4+
25
import annotation.experimental
36

47
/** A marker trait that declares that all inheriting classes are "pure" in the

library/src/scala/Selectable.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package scala
22

3+
import language.experimental.captureChecking
34

45
/** A marker trait for objects that support structural selection via
56
* `selectDynamic` and `applyDynamic`

library/src/scala/main.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
package scala
1010

11+
import language.experimental.captureChecking
12+
1113
/** An annotation that designates a main function
1214
*/
1315
class main extends scala.annotation.Annotation {}

library/src/scala/runtime/stdLibPatches/Predef.scala

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

3+
import scala.language.experimental.captureChecking
4+
35
import scala.annotation.experimental
46
import scala.annotation.internal.RuntimeChecked
57

0 commit comments

Comments
 (0)