untrackedCaptures
scala.caps.unsafe.untrackedCaptures
final class untrackedCaptures extends StaticAnnotation
Two usages:
-
Marks the constructor parameter as untracked. The capture set of this parameter will not be included in the capture set of the constructed object.
2. Marks a class field that has a cap in its capture set, so that the cap is not contributed to the class instance. Example:
class A { val b B^ = ... }; new A()
has type A^ since b contributes a cap. But
class A { @untrackedCaptures val b: B^ = ... }; new A()
has type A. The b field does not contribute its cap.
Attributes
- Note
-
This should go into annotations. For now it is here, so that we can experiment with it quickly between minor releases
- Source
- package.scala
- Graph
-
- Supertypes
In this article