dotty.tools.dotc.cc

Members list

Type members

Classlikes

abstract class AnnotatedCapability(annotCls: Context ?=> ClassSymbol)

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class CCState

Capture checking state, which is known to other capture checking components

Capture checking state, which is known to other capture checking components

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
object CCState

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
CCState.type
object CapsOfApply

An extractor for caps.capsOf[X], which is used to express a generic capture set as a tree in a @retains annotation.

An extractor for caps.capsOf[X], which is used to express a generic capture set as a tree in a @retains annotation.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
case class CaptureAnnotation(refs: CaptureSet, boxed: Boolean)(cls: Symbol) extends Annotation

An annotation representing a capture set and whether it is boxed. It simulates a normal @retains annotation except that it is more efficient, supports variables as capture sets, and adds a boxed flag. These annotations are created during capture checking. Before that there are only regular @retains and @retainsByName annotations.

An annotation representing a capture set and whether it is boxed. It simulates a normal @retains annotation except that it is more efficient, supports variables as capture sets, and adds a boxed flag. These annotations are created during capture checking. Before that there are only regular @retains and @retainsByName annotations.

Value parameters

boxed

whether the type carrying the annotation is boxed

cls

the underlying class (either annotation.retains or annotation.retainsByName)

refs

the capture set

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Annotation
trait Showable
class Object
trait Matchable
class Any
Show all
object CaptureRef

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
CaptureRef.type
trait CaptureRef extends TypeProxy, ValueType

A trait for references in CaptureSets. These can be NamedTypes, ThisTypes or ParamRefs, as well as three kinds of AnnotatedTypes representing readOnly, reach, and maybe capabilities. If there are several annotations they come with an order: * first, .rd next, ? last.

A trait for references in CaptureSets. These can be NamedTypes, ThisTypes or ParamRefs, as well as three kinds of AnnotatedTypes representing readOnly, reach, and maybe capabilities. If there are several annotations they come with an order: * first, .rd next, ? last.

Attributes

Companion
object
Supertypes
trait ValueType
trait TermType
class TypeProxy
class Type
trait Showable
trait Hashable
class Object
trait Matchable
class Any
Show all
Known subtypes

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Run
class TASTYRun
Self type
Run
sealed abstract class CaptureSet extends Showable

A class for capture sets. Capture sets can be constants or variables. Capture sets support inclusion constraints <:< where <:< is subcapturing.

A class for capture sets. Capture sets can be constants or variables. Capture sets support inclusion constraints <:< where <:< is subcapturing.

They also allow

  • mapping with functions from elements to capture sets
  • filtering with predicates on elements
  • intersecting wo capture sets

That is, constraints can be of the forms

cs1 <:< cs2 cs1 = ∪ {f(x) | x ∈ cs2} where f is a function from capture references to capture sets. cs1 = ∪ {x | x ∈ cs2, p(x)} where p is a predicate on capture references cs1 = cs2 ∩ cs2

We call the resulting constraint system "monadic set constraints". To support capture propagation across maps, mappings are supported only if the mapped function is either a bijection or if it is idempotent on capture references (c.f. doc comment on map below).

Attributes

Companion
object
Supertypes
trait Showable
class Object
trait Matchable
class Any
Known subtypes
class Const
object Fluid
class Var
class DerivedVar
class BiMapped
class Filtered
class Diff
class HiddenSet
class RefiningVar
Show all
object CaptureSet

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
CaptureSet.type
object CapturingType

A (possibly boxed) capturing type. This is internally represented as an annotated type with a @retains or @retainsByName annotation, but the extractor will succeed only at phase CheckCaptures. That way, we can ignore caturing information until phase CheckCaptures since it is wrapped in a plain annotation.

A (possibly boxed) capturing type. This is internally represented as an annotated type with a @retains or @retainsByName annotation, but the extractor will succeed only at phase CheckCaptures. That way, we can ignore caturing information until phase CheckCaptures since it is wrapped in a plain annotation.

The same trick does not work for the boxing information. Boxing is context dependent, so we have to add that information in the Setup step preceding CheckCaptures. Boxes are added for all type arguments of methods. For type arguments of applied types a different strategy is used where we box arguments of applied types that are not functions when accessing the argument.

An alternative strategy would add boxes also to arguments of applied types during setup. But this would have to be done for all possibly accessibly types from the compiled units as well as their dependencies. It's difficult to do this in a DenotationTransformer without accidentally forcing symbol infos. That's why this alternative was not implemented. If we would go back on this it would make sense to also treat captuyring types different from annotations and to generate them all during Setup and in DenotationTransformers.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
object CheckCaptures

The capture checker

The capture checker

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Companion
object
Supertypes
class Recheck
class Phase
class Object
trait Matchable
class Any
Show all
Self type
class CleanupRetains(using x$1: Context) extends TypeMap

Drop retains annotations in the type.

Drop retains annotations in the type.

Attributes

Supertypes
class TypeMap
trait Type => Type
class Object
trait Matchable
class Any
Show all
object ContainsImpl

An extractor for a contains argument

An extractor for a contains argument

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
object ContainsParam

An extractor for a contains parameter

An extractor for a contains parameter

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
abstract class DeepTypeAccumulator[T](using x$1: Context) extends TypeAccumulator[T]

A class encapsulating the assumulator logic needed for CaptureSet.ofTypeDeeply and derivesFromCapTraitDeeply. NOTE: The traversal logic needs to be in sync with narrowCaps in CaptureOps, which replaces caps with reach capabilties. There are two exceptions, however.

A class encapsulating the assumulator logic needed for CaptureSet.ofTypeDeeply and derivesFromCapTraitDeeply. NOTE: The traversal logic needs to be in sync with narrowCaps in CaptureOps, which replaces caps with reach capabilties. There are two exceptions, however.

  • First, invariant arguments. These have to be included to be conservative in dcs but must be excluded in narrowCaps.
  • Second, unconstrained type variables are handled specially in ofTypeDeeply.

Attributes

Supertypes
class TypeAccumulator[T]
trait (T, Type) => T
class Object
trait Matchable
class Any
Show all
trait ErrorNote

A base trait for data producing addenda to error messages

A base trait for data producing addenda to error messages

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait FollowAliasesMap(using x$1: Context) extends TypeMap

A typemap that follows aliases and keeps their transformed results if there is a change.

A typemap that follows aliases and keeps their transformed results if there is a change.

Attributes

Supertypes
class TypeMap
trait Type => Type
class Object
trait Matchable
class Any
Show all
Known subtypes
class Inverse
class CapToFresh

An extractor for all kinds of function types as well as method and poly types. It includes aliases of function types such as =>. TODO: Can we do without?

An extractor for all kinds of function types as well as method and poly types. It includes aliases of function types such as =>. TODO: Can we do without?

Attributes

Returns

1st half: The argument types or empty if this is a type function 2nd half: The result type

Supertypes
class Object
trait Matchable
class Any
Self type
class IllegalCaptureRef(tpe: Type)(using x$2: Context) extends Exception

An exception thrown if a @retains argument is not syntactically a CaptureRef

An exception thrown if a @retains argument is not syntactically a CaptureRef

Attributes

Supertypes
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all

An extractor for ref @maybeCapability, which is used to express the maybe capability ref? as a type.

An extractor for ref @maybeCapability, which is used to express the maybe capability ref? as a type.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type

An extractor for ref @annotation.internal.reachCapability, which is used to express the reach capability ref* as a type.

An extractor for ref @annotation.internal.reachCapability, which is used to express the reach capability ref* as a type.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type

An extractor for caps.reachCapability(ref), which is used to express a reach capability as a tree in a @retains annotation.

An extractor for caps.reachCapability(ref), which is used to express a reach capability as a tree in a @retains annotation.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type

An extractor for ref @readOnlyCapability, which is used to express the read-only capability ref.rd as a type.

An extractor for ref @readOnlyCapability, which is used to express the read-only capability ref.rd as a type.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type

An extractor for caps.readOnlyCapability(ref), which is used to express a read-only capability as a tree in a @retains annotation.

An extractor for caps.readOnlyCapability(ref), which is used to express a read-only capability as a tree in a @retains annotation.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
object RetainingType

A builder and extractor for annotated types with @retains or @retainsByName annotations.

A builder and extractor for annotated types with @retains or @retainsByName annotations.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
object SepCheck

The separation checker is a tree traverser that is run after capture checking. It checks tree nodes for various separation conditions, explained in the methods below. Rough summary:

The separation checker is a tree traverser that is run after capture checking. It checks tree nodes for various separation conditions, explained in the methods below. Rough summary:

  • Hidden sets of arguments must not be referred to in the same application
  • Hidden sets of (result-) types must not be referred to alter in the same scope.
  • Returned hidden sets can only refer to @consume parameters.
  • If returned hidden sets refer to an encloding this, the reference must be from a @consume method.
  • Consumed entities cannot be used subsequently.
  • Entitites cannot be consumed in a loop.

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
SepCheck.type
class SepCheck(checker: CheckerAPI) extends TreeTraverser

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
object Setup

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
Setup.type

Phase that sets up everthing for capture checking.

Phase that sets up everthing for capture checking.

A tree traverser that prepares a compilation unit to be capture checked. It does the following:

  • For every inferred type, drop any retains annotations, add capture sets to all its parts, add refinements to class types and function types. (c.f. mapInferred)
  • For explicit capturing types, expand throws aliases to the underlying (pure) function, and add some implied capture sets to curried functions (c.f. expandThrowsAlias, expandAbbreviations).
  • Add capture sets to self types of classes and objects, unless the self type was written explicitly.
  • Box the types of mutable variables and type arguments to methods (type arguments of types are boxed on access).
  • Link the external types of val and def symbols with the inferred types based on their parameter symbols.

Attributes

Companion
object
Supertypes
trait SetupAPI
class PreRecheck
class Phase
class Object
trait Matchable
class Any
Show all
Self type
trait SetupAPI

Operations accessed from CheckCaptures

Operations accessed from CheckCaptures

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Setup

Attributes

Supertypes
trait CaptureRef
trait ValueType
trait TermType
class TypeProxy
class Type
trait Showable
trait Hashable
class Object
trait Matchable
class Any
Show all
Known subtypes
class TermParamRef
class TermRef
class ThisType
object Synthetics

Classification and transformation methods for function methods and synthetic case class methods that need to be treated specially. In particular, compute capturing types for some of these methods which have inferred (result-)types that need to be established under separate compilation.

Classification and transformation methods for function methods and synthetic case class methods that need to be treated specially. In particular, compute capturing types for some of these methods which have inferred (result-)types that need to be established under separate compilation.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Synthetics.type
object ccConfig

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
ccConfig.type
object root

A module defining three kinds of root capabilities

A module defining three kinds of root capabilities

  • cap of kind Global: This is the global root capability. Among others it is used in the types of formal parameters, in type bounds, and in self types. cap does not subsume other capabilities, except in arguments of withCapAsRoot calls.
  • Instances of Fresh(hidden), of kind Fresh. These do subsume other capabilties in scope. They track with hidden sets which other capabilities were subsumed. Hidden sets are inspected by separation checking.
  • Instances of Result(binder), of kind Result. These are existentials associated with the result types of dependent methods. They don't subsume other capabilties.

Representation:

  • cap is just the TermRef scala.caps.cap defined in the caps module
  • Fresh and Result instances are annotated types of scala.caps.cap with a special root.Annot annotation. The symbol of the annotation is annotation.internal.rootCapability. The annotation carries a kind, which provides a hidden set for Fresh instances and a binder method type for Result instances.

Setup:

In the setup phase, cap instances in the result of a dependent function type or method type such as (x: T): C^{cap} are converted to Result(binder) instances, where binder refers to the method type. Most other cap instances are mapped to Fresh instances instead. For example the cap in the result of T => C^{cap} is mapped to a Fresh instance.

If one needs to use a dependent function type yet one still want to map cap to a fresh instance instead an existential root, one can achieve that by the use of a type alias. For instance, the following type creates an existential for ^:

 (x: A) => (C^{x}, D^)

By contrast, this variant creates a fresh instance instead:

 type F[X] = (x: A) => (C^{x}, X)
 F[D^]

The trick is that the argument D^ is mapped to D^{fresh} before the F alias is expanded.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
root.type

Value members

Concrete methods

def ccState(using Context): CCState

The currently valid CCState

The currently valid CCState

Attributes

def depFun(args: List[Type], resultType: Type, isContextual: Boolean, paramNames: List[TermName])(using Context): Type

A dependent function type with given arguments and result type TODO Move somewhere else where we treat all function type related ops together.

A dependent function type with given arguments and result type TODO Move somewhere else where we treat all function type related ops together.

Attributes

Are we at checkCaptures phase?

Are we at checkCaptures phase?

Attributes

Are we at checkCaptures or Setup phase?

Are we at checkCaptures or Setup phase?

Attributes

Concrete fields

Context property to print root.Fresh(...) as "fresh" instead of "cap"

Context property to print root.Fresh(...) as "fresh" instead of "cap"

Attributes

Extensions

Extensions

extension (self: Type)
def derivedFunctionOrMethod(argTypes: List[Type], resType: Type)(using Context): Type

If tp is a function or method, a type of the same kind with the given argument and result types.

If tp is a function or method, a type of the same kind with the given argument and result types.

Attributes

extension (sym: Symbol)

Does this symbol allow results carrying the universal capability? Currently this is true only for function type applies (since their results are unboxed) and erasedValue since this function is magic in that is allows to conjure global capabilies from nothing (aside: can we find a more controlled way to achieve this?). But it could be generalized to other functions that so that they can take capability classes as arguments.

Does this symbol allow results carrying the universal capability? Currently this is true only for function type applies (since their results are unboxed) and erasedValue since this function is magic in that is allows to conjure global capabilies from nothing (aside: can we find a more controlled way to achieve this?). But it could be generalized to other functions that so that they can take capability classes as arguments.

Attributes

A class is pure if:

A class is pure if:

  • one its base types has an explicitly declared self type with an empty capture set
  • or it is a value class
  • or it is an exception
  • or it is one of Nothing, Null, or String

Attributes

It's a parameter accessor that is not annotated @constructorOnly or @uncheckedCaptures

It's a parameter accessor that is not annotated @constructorOnly or @uncheckedCaptures

Attributes

def isRetains(using Context): Boolean

This symbol is one of retains or retainsCap

This symbol is one of retains or retainsCap

Attributes

This symbol is one of retains, retainsCap, orretainsByName

This symbol is one of retains, retainsCap, orretainsByName

Attributes

def isUseParam(using Context): Boolean

sym is annotated @use or it is a type parameter with a matching

sym is annotated @use or it is a type parameter with a matching

Attributes

When applying sym, would the result type be unboxed? This is the case if the result type contains a top-level reference to an enclosing class or method type parameter and the method does not allow root capture. If the type parameter is instantiated to a boxed type, that type would have to be unboxed in the method's result.

When applying sym, would the result type be unboxed? This is the case if the result type contains a top-level reference to an enclosing class or method type parameter and the method does not allow root capture. If the type parameter is instantiated to a boxed type, that type would have to be unboxed in the method's result.

Attributes

extension (tp: Type)
def boxed(using Context): Type

If this is a unboxed capturing type with nonempty capture set, its boxed version. Or, if type is a TypeBounds of capturing types, the version where the bounds are boxed. The identity for all other types.

If this is a unboxed capturing type with nonempty capture set, its boxed version. Or, if type is a TypeBounds of capturing types, the version where the bounds are boxed. The identity for all other types.

Attributes

The capture set consisting of all top-level captures of tp that appear under a box. Unlike for boxed this also considers parents of capture types, unions and intersections, and type proxies other than abstract types. Furthermore, if the original type is a capture ref x, it replaces boxed universal sets on the fly with x*.

The capture set consisting of all top-level captures of tp that appear under a box. Unlike for boxed this also considers parents of capture types, unions and intersections, and type proxies other than abstract types. Furthermore, if the original type is a capture ref x, it replaces boxed universal sets on the fly with x*.

Attributes

final def captureSet(using Context): CaptureSet

The capture set of a type. This is:

The capture set of a type. This is:

  • For trackable capture references: The singleton capture set consisting of just the reference, provided the underlying capture set of their info is not empty.
  • For other capture references: The capture set of their info
  • For all other types: The result of CaptureSet.ofType

Attributes

def capturing(ref: CaptureRef)(using Context): Type

A type capturing ref

A type capturing ref

Attributes

def capturing(cs: CaptureSet)(using Context): Type

A type capturing the capture set cs. If this type is already a capturing type the two capture sets are combined.

A type capturing the capture set cs. If this type is already a capturing type the two capture sets are combined.

Attributes

Does this type contain no-flip covariant occurrences of cap?

Does this type contain no-flip covariant occurrences of cap?

Attributes

def deepCaptureSet(includeTypevars: Boolean)(using Context): CaptureSet

The deep capture set of a type. This is by default the union of all covariant capture sets embedded in the widened type, as computed by CaptureSet.ofTypeDeeply. If that set is nonempty, and the type is a singleton capability x or a reach capability x*, the deep capture set can be narrowed to{x*}.

The deep capture set of a type. This is by default the union of all covariant capture sets embedded in the widened type, as computed by CaptureSet.ofTypeDeeply. If that set is nonempty, and the type is a singleton capability x or a reach capability x*, the deep capture set can be narrowed to{x*}.

Attributes

def derivedCapturingType(parent: Type, refs: CaptureSet)(using Context): Type

Attributes

Tests whether the type derives from capability class cls.

Tests whether the type derives from capability class cls.

Attributes

Tests whether all CapturingType parts of the type that are traversed for dcs computation satisfy at least one of two conditions:

Tests whether all CapturingType parts of the type that are traversed for dcs computation satisfy at least one of two conditions:

  1. They decorate classes that extend the given capability class cls, or
  2. Their capture set is constant and consists only of capabilities the derive from cls in the sense of derivesFromCapTrait.

Attributes

Drop @retains annotations everywhere

Drop @retains annotations everywhere

Attributes

def forceBoxStatus(boxed: Boolean)(using Context): Type

If this type is a capturing type, the version with boxed statues as given by boxed. If it is a TermRef of a capturing type, and the box status flips, widen to a capturing type that captures the TermRef.

If this type is a capturing type, the version with boxed statues as given by boxed. If it is a TermRef of a capturing type, and the box status flips, widen to a capturing type that captures the TermRef.

Attributes

def isAliasFun(using Context): Boolean

Knowing that tp is a function type, is it an alias to a function other than =>?

Knowing that tp is a function type, is it an alias to a function other than =>?

Attributes

Is type known to be always pure by its class structure? In that case, adding a capture set to it would not make sense.

Is type known to be always pure by its class structure? In that case, adding a capture set to it would not make sense.

Attributes

Is the box status of tp and tp2 compatible? I.ee they are box boxed, or both unboxed, or one of them has an empty capture set.

Is the box status of tp and tp2 compatible? I.ee they are box boxed, or both unboxed, or one of them has an empty capture set.

Attributes

Is the boxedCaptureSet of this type nonempty?

Is the boxedCaptureSet of this type nonempty?

Attributes

Is this a type extending Mutable that has update methods?

Is this a type extending Mutable that has update methods?

Attributes

final def isParamPath(using Context): Boolean
final def isTrackableRef(using Context): Boolean

Is this type a CaptureRef that can be tracked? This is true for

Is this type a CaptureRef that can be tracked? This is true for

  • all ThisTypes and all TermParamRef,
  • stable TermRefs with NoPrefix or ThisTypes as prefixes,
  • the root capability caps.cap
  • abstract or parameter TypeRefs that derive from caps.CapSet
  • annotated types that represent reach or maybe capabilities

Attributes

def level(using Context): Level
def maybe(using Context): CaptureRef

If x is a capture ref, its maybe capability x?, represented internally as x @maybeCapability. x? stands for a capability x that might or might not be part of a capture set. We have {} <: {x?} <: {x}. Maybe capabilities cannot be propagated between sets. If a <: b and a acquires x? then x is propagated to b as a conservative approximation.

If x is a capture ref, its maybe capability x?, represented internally as x @maybeCapability. x? stands for a capability x that might or might not be part of a capture set. We have {} <: {x?} <: {x}. Maybe capabilities cannot be propagated between sets. If a <: b and a acquires x? then x is propagated to b as a conservative approximation.

Maybe capabilities should only arise for capture sets that appear in invariant position in their surrounding type. They are similar to TypeBunds types, but restricted to capture sets. For instance,

Array[C^{x?}]

should be morally equivalent to

Array[_ >: C^{} <: C^{x}]

but it has fewer issues with type inference.

Attributes

final def pathOwner(using Context): Symbol

If this part starts with C.this, the class C. Otherwise, if it starts with a reference r, r's owner. Otherwise NoSymbol.

If this part starts with C.this, the class C. Otherwise, if it starts with a reference r, r's owner. Otherwise NoSymbol.

Attributes

final def pathRoot(using Context): Type

The first element of this path type. Note that class parameter references are of the form this.C but their pathroot is still this.C, not this.

The first element of this path type. Note that class parameter references are of the form this.C but their pathroot is still this.C, not this.

Attributes

def reach(using Context): CaptureRef

If x is a capture ref, its reach capability x*, represented internally as x @reachCapability. x* stands for all capabilities reachable through x". We have {x} <: {x*} <: dcs(x)} where the deep capture set dcs(x) of x is the union of all capture sets that appear in covariant position in the type of x. If x and y are different variables then {x*} and {y*} are unrelated.

If x is a capture ref, its reach capability x*, represented internally as x @reachCapability. x* stands for all capabilities reachable through x". We have {x} <: {x*} <: dcs(x)} where the deep capture set dcs(x) of x is the union of all capture sets that appear in covariant position in the type of x. If x and y are different variables then {x*} and {y*} are unrelated.

Reach capabilities cannot wrap read-only capabilities or maybe capabilities. We have (x.rd).reach = x*.rd (x.rd)? = (x*)?

Attributes

If x is a capture ref, its read-only capability x.rd, represented internally as x @readOnlyCapability. We have {x.rd} <: {x}. If x is a reach capability y*, then its read-only version is x.rd*.

If x is a capture ref, its read-only capability x.rd, represented internally as x @readOnlyCapability. We have {x.rd} <: {x}. If x is a reach capability y*, then its read-only version is x.rd*.

Read-only capabilities cannot wrap maybe capabilities but they can wrap reach capabilities. We have (x?).readOnly = (x.rd)?

Attributes

Map capturing type to their parents. Capturing types accessible via dealising are also stripped.

Map capturing type to their parents. Capturing types accessible via dealising are also stripped.

Attributes

def unboxed(using Context): Type

If this is a unboxed capturing type with nonempty capture set, its boxed version. Or, if type is a TypeBounds of capturing types, the version where the bounds are boxed. The identity for all other types.

If this is a unboxed capturing type with nonempty capture set, its boxed version. Or, if type is a TypeBounds of capturing types, the version where the bounds are boxed. The identity for all other types.

Attributes

def withReachCaptures(ref: Type)(using Context): Type

If x is a capture ref, replace all no-flip covariant occurrences of cap in type tp with x*.

If x is a capture ref, replace all no-flip covariant occurrences of cap in type tp with x*.

Attributes

extension (tp: MethodType)

A method marks an existential scope unless it is the prefix of a curried method

A method marks an existential scope unless it is the prefix of a curried method

Attributes

extension (tp: AnnotatedType)
def isBoxed(using Context): Boolean

Is this a boxed capturing type?

Is this a boxed capturing type?

Attributes

extension (tree: Tree)

The arguments of a @retains, @retainsCap or @retainsByName annotation

The arguments of a @retains, @retainsCap or @retainsByName annotation

Attributes

Map tree with CaptureRef type to its type, map CapSet^{refs} to the refs references, throw IllegalCaptureRef otherwise

Map tree with CaptureRef type to its type, map CapSet^{refs} to the refs references, throw IllegalCaptureRef otherwise

Attributes

Convert a @retains or @retainsByName annotation tree to the capture set it represents. For efficience, the result is cached as an Attachment on the tree.

Convert a @retains or @retainsByName annotation tree to the capture set it represents. For efficience, the result is cached as an Attachment on the tree.

Attributes