Skip to content

Changes in preparation to make caps.Capability stable #22849

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Mar 24, 2025
Merged
Prev Previous commit
Next Next commit
Keep Capability experimental
  • Loading branch information
natsukagami committed Mar 21, 2025
commit 2674d4777bebc436fbb715bc9676f186ad49b05a
1 change: 1 addition & 0 deletions compiler/src/dotty/tools/dotc/core/Definitions.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2098,6 +2098,7 @@ class Definitions {
*/
@tu lazy val ccExperimental: Set[Symbol] = Set(
CapsModule, CapsModule.moduleClass, PureClass,
Caps_Capability, // TODO: Remove when Capability is stabilized
RequiresCapabilityAnnot,
captureRoot, Caps_CapSet, Caps_ContainsTrait, Caps_ContainsModule, Caps_ContainsModule.moduleClass, UseAnnot,
Caps_Mutable, Caps_SharedCapability, ConsumeAnnot,
Expand Down
2 changes: 2 additions & 0 deletions library/src/scala/caps/package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import annotation.{experimental, compileTimeOnly, retainsCap}
* But even without capture checking, extending this trait can be useful for documenting the intended purpose
* of a class.
*/
@experimental
trait Capability extends Any

/** The universal capture reference. */
Expand Down Expand Up @@ -89,6 +90,7 @@ final class consume extends annotation.StaticAnnotation
/** A trait that used to allow expressing existential types. Replaced by
* root.Result instances.
*/
@experimental
@deprecated
sealed trait Exists extends Capability

Expand Down