Fluid

dotty.tools.dotc.cc.CaptureSet.Fluid
object Fluid extends Const

A special capture set that gets added to the types of symbols that were not themselves capture checked, in order to admit arbitrary corresponding capture sets in subcapturing comparisons. Similar to platform types for explicit nulls, this provides more lenient checking against compilation units that were not yet compiled with capture checking on.

Attributes

Graph
Supertypes
class Const
class CaptureSet
trait Showable
class Object
trait Matchable
class Any
Show all
Self type
Fluid.type

Members list

Value members

Concrete methods

override def accountsFor(x: CaptureRef)(using Context)(using VarState): Boolean

{x} <:< this where <:< is subcapturing, but treating all variables as frozen.

{x} <:< this where <:< is subcapturing, but treating all variables as frozen.

Attributes

Definition Classes
override def addThisElem(elem: CaptureRef)(using Context, VarState): CompareResult

Add a specific element, assuming it is not already accounted for, and omitting any mapping or filtering, without possibility to backtrack to the underlying capture set.

Add a specific element, assuming it is not already accounted for, and omitting any mapping or filtering, without possibility to backtrack to the underlying capture set.

Attributes

Definition Classes
override def isAlwaysEmpty(using Context): Boolean

Is this capture set always empty? For unsolved capture veriables, returns always false.

Is this capture set always empty? For unsolved capture veriables, returns always false.

Attributes

Definition Classes
override def mightAccountFor(x: CaptureRef)(using Context): Boolean

A more optimistic version of accountsFor, which does not take variable supersets of the x reference into account. A set might account for x if it accounts for x in a state where we assume all supersets of x have just the elements known at this point. On the other hand if x's capture set has no known elements, a set cs might account for x only if it subsumes x or it contains the root capability cap.

A more optimistic version of accountsFor, which does not take variable supersets of the x reference into account. A set might account for x if it accounts for x in a state where we assume all supersets of x have just the elements known at this point. On the other hand if x's capture set has no known elements, a set cs might account for x only if it subsumes x or it contains the root capability cap.

Attributes

Definition Classes
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Const -> Any

Inherited methods

def **(that: CaptureSet)(using Context): CaptureSet

The largest capture set (via <:<) that is a subset of both this and that

The largest capture set (via <:<) that is a subset of both this and that

Attributes

Inherited from:
CaptureSet
def +(ref: CaptureRef)(using Context): CaptureSet

The smallest superset (via <:<) of this capture set that also contains ref.

The smallest superset (via <:<) of this capture set that also contains ref.

Attributes

Inherited from:
CaptureSet
def ++(that: Const)(using Context): Const

Attributes

Inherited from:
CaptureSet
def ++(that: CaptureSet)(using Context): CaptureSet

The smallest capture set (via <:<) that is a superset of both this and that

The smallest capture set (via <:<) that is a superset of both this and that

Attributes

Inherited from:
CaptureSet
def -(ref: CaptureRef)(using Context): CaptureSet

The largest subset (via <:<) of this capture set that does not account for ref

The largest subset (via <:<) of this capture set that does not account for ref

Attributes

Inherited from:
CaptureSet
def --(that: Const)(using Context): CaptureSet

The largest subset (via <:<) of this capture set that does not account for any of the elements in the constant capture set that

The largest subset (via <:<) of this capture set that does not account for any of the elements in the constant capture set that

Attributes

Inherited from:
CaptureSet
def =:=(that: CaptureSet)(using Context): Boolean

Two capture sets are considered =:= equal if they mutually subcapture each other in a frozen state.

Two capture sets are considered =:= equal if they mutually subcapture each other in a frozen state.

Attributes

Inherited from:
CaptureSet

If this is a variable, add cs as a dependent set

If this is a variable, add cs as a dependent set

Attributes

Inherited from:
Const
def asConst(using Context): Const

Convert to Const. @pre: isConst

Convert to Const. @pre: isConst

Attributes

Inherited from:
CaptureSet
def asVar(using Context): Var

Cast to variable. @pre: !isConst

Cast to variable. @pre: !isConst

Attributes

Inherited from:
CaptureSet
final def containsCap(using Context): Boolean

Attributes

Inherited from:
CaptureSet

Does this capture set contain a root reference cap or cap.rd as element?

Does this capture set contain a root reference cap or cap.rd as element?

Attributes

Inherited from:
CaptureSet
def disallowRootCapability(handler: () => Context ?=> Unit)(using Context): CaptureSet.this.type

Invoke handler if this set has (or later aquires) the root capability cap

Invoke handler if this set has (or later aquires) the root capability cap

Attributes

Inherited from:
CaptureSet
def ensureWellformed(handler: CaptureRef => Context ?=> Unit)(using Context): CaptureSet.this.type

Invoke handler on the elements to ensure wellformedness of the capture set. The handler might add additional elements to the capture set.

Invoke handler on the elements to ensure wellformedness of the capture set. The handler might add additional elements to the capture set.

Attributes

Inherited from:
CaptureSet
def fallbackToText(printer: Printer): Text

A fallback text representation, if the pattern matching in Printers does not have a case for this showable element

A fallback text representation, if the pattern matching in Printers does not have a case for this showable element

Attributes

Inherited from:
Showable

The largest subset (via <:<) of this capture set that only contains elements for which p is true.

The largest subset (via <:<) of this capture set that only contains elements for which p is true.

Attributes

Inherited from:
CaptureSet
def isConst(using Context): Boolean

Is this capture set constant (i.e. not an unsolved capture variable)? Solved capture variables count as constant.

Is this capture set constant (i.e. not an unsolved capture variable)? Solved capture variables count as constant.

Attributes

Inherited from:
Const
final def isExclusive(using Context): Boolean

Attributes

Inherited from:
CaptureSet
final def isNotEmpty: Boolean

Is this capture set definitely non-empty?

Is this capture set definitely non-empty?

Attributes

Inherited from:
CaptureSet

Is this set provisionally solved, so that another cc run might unfreeze it?

Is this set provisionally solved, so that another cc run might unfreeze it?

Attributes

Inherited from:
Const
final def isReadOnly(using Context): Boolean

Attributes

Inherited from:
CaptureSet
final def isUniversal(using Context): Boolean

Does this capture set contain the root reference cap as element?

Does this capture set contain the root reference cap as element?

Attributes

Inherited from:
CaptureSet
final def keepAlways: Boolean

Attributes

Inherited from:
CaptureSet
def level: Level

An optional level limit, or undefinedLevel if none exists. All elements of the set must be at levels equal or smaller than the level of the set, if it is defined.

An optional level limit, or undefinedLevel if none exists. All elements of the set must be at levels equal or smaller than the level of the set, if it is defined.

Attributes

Inherited from:
Const
def map(tm: TypeMap)(using Context): CaptureSet

Capture set obtained by applying tm to all elements of the current capture set and joining the results. If the current capture set is a variable we handle this as follows:

Capture set obtained by applying tm to all elements of the current capture set and joining the results. If the current capture set is a variable we handle this as follows:

  • If the map is a BiTypeMap, the same transformation is applied to all future additions of new elements. We try to fuse with previous maps to avoid long paths of BiTypeMapped sets.
  • If the map is some other map that maps the current set of elements to itself, return the current var. We implicitly assume that the map will also map any elements added in the future to themselves. This assumption can be tested to hold by setting the ccConfig.checkSkippedMaps setting to true.
  • If the map is some other map that does not map all elements to themselves, freeze the current set (i.e. make it porvisionally solved) and return the mapped elements as a constant set.

Attributes

Inherited from:
CaptureSet
def maybe(using Context): CaptureSet

Attributes

Inherited from:
CaptureSet

A more optimistic version of subCaptures used to choose one of two typing rules for selections and applications. cs1 mightSubcapture cs2 if cs2 might account for every element currently known to be in cs1, and the same is not true in reverse when we compare elements of cs2 vs cs1.

A more optimistic version of subCaptures used to choose one of two typing rules for selections and applications. cs1 mightSubcapture cs2 if cs2 might account for every element currently known to be in cs1, and the same is not true in reverse when we compare elements of cs2 vs cs1.

Attributes

Inherited from:
CaptureSet

More info enabled by -Y flags

More info enabled by -Y flags

Attributes

Inherited from:
CaptureSet
def owner: Symbol

An optional owner, or NoSymbol if none exists. Used for diagnstics

An optional owner, or NoSymbol if none exists. Used for diagnstics

Attributes

Inherited from:
Const
def processElems[T](f: Refs => T): T

Apply function f to the elements. Typically used for printing. Overridden in HiddenSet so that we don't run into infinite recursions

Apply function f to the elements. Typically used for printing. Overridden in HiddenSet so that we don't run into infinite recursions

Attributes

Inherited from:
CaptureSet

Attributes

Inherited from:
CaptureSet
def show(using Context): String

The string representation of this showable element.

The string representation of this showable element.

Attributes

Inherited from:
Showable
def showIndented(margin: Int)(using Context): String

The string representation with each line after the first one indented by the given given margin (in spaces).

The string representation with each line after the first one indented by the given given margin (in spaces).

Attributes

Inherited from:
Showable
def showSummary(depth: Int)(using Context): String

The summarized string representation of this showable element. Recursion depth is limited to some smallish value. Default is Config.summarizeDepth.

The summarized string representation of this showable element. Recursion depth is limited to some smallish value. Default is Config.summarizeDepth.

Attributes

Inherited from:
Showable
final def subCaptures(that: CaptureSet)(using ctx: Context, vs: VarState): CompareResult

The subcapturing test, using a given VarState

The subcapturing test, using a given VarState

Attributes

Inherited from:
CaptureSet
final def subCaptures(that: CaptureSet, vs: VarState)(using Context): CompareResult

The subcapturing test, taking an explicit VarState.

The subcapturing test, taking an explicit VarState.

Attributes

Inherited from:
CaptureSet

A mapping resulting from substituting parameters of a BindingType to a list of types

A mapping resulting from substituting parameters of a BindingType to a list of types

Attributes

Inherited from:
CaptureSet
def toConst: Const

Convert to Const with current elements unconditionally

Convert to Const with current elements unconditionally

Attributes

Inherited from:
CaptureSet

A regular @retains or @retainsByName annotation with the elements of this set as arguments.

A regular @retains or @retainsByName annotation with the elements of this set as arguments.

Attributes

Inherited from:
CaptureSet
override def toText(printer: Printer): Text

The text representation of this showable element. This normally dispatches to a pattern matching method in Printers.

The text representation of this showable element. This normally dispatches to a pattern matching method in Printers.

Attributes

Definition Classes
Inherited from:
CaptureSet
def upperApprox(origin: CaptureSet)(using Context): CaptureSet

An upper approximation of this capture set, i.e. a constant set that is subcaptured by this set. If the current set is a variable it is the intersection of all upper approximations of known supersets of the variable. The upper approximation is meaningful only if it is constant. If not, upperApprox can return an arbitrary capture set variable. upperApprox is used in solve.

An upper approximation of this capture set, i.e. a constant set that is subcaptured by this set. If the current set is a variable it is the intersection of all upper approximations of known supersets of the variable. The upper approximation is meaningful only if it is constant. If not, upperApprox can return an arbitrary capture set variable. upperApprox is used in solve.

Attributes

Inherited from:
Const
def withDescription(description: String): Const

This capture set with a description that tells where it comes from

This capture set with a description that tells where it comes from

Attributes

Inherited from:
Const

Inherited fields

The provided description (set via withDescription) for this capture set or else ""

The provided description (set via withDescription) for this capture set or else ""

Attributes

Inherited from:
Const
val elems: Refs

The elements of this capture set. For capture variables, the elements known so far.

The elements of this capture set. For capture variables, the elements known so far.

Attributes

Inherited from:
Const