untrackedCaptures

scala.caps.unsafe.untrackedCaptures
final class untrackedCaptures extends StaticAnnotation

Three usages:

  1. 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 root capability in its capture set, so that the root capability is not contributed to the class instance. Example:

class A { val b B^ = ... }; new A()

has type A^ since b contributes an any. But

class A { @untrackedCaptures val b: B^ = ... }; new A()

has type A. The b field does not contribute its any.

3. Allows a field to be declarewd in a class that does not extend Stateful, and suppresses checks for updates to the field.

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
class Annotation
class Object
trait Matchable
class Any
In this article