SepCheck

dotty.tools.dotc.cc.SepCheck
See theSepCheck companion class
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:

  • 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
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
SepCheck.type

Members list

Type members

Classlikes

enum Captures

Enumerates kinds of captures encountered so far

Enumerates kinds of captures encountered so far

Attributes

Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
class ConstConsumedSet(val refs: Array[CaptureRef], val locs: Array[SrcPos]) extends ConsumedSet

A fixed consumed set consisting of the given references refs and associated source positions locs

A fixed consumed set consisting of the given references refs and associated source positions locs

Attributes

Supertypes
class ConsumedSet
class Object
trait Matchable
class Any
abstract class ConsumedSet

A class for segmented sets of consumed references. References are associated with the source positions where they first appeared. References are compared with eq.

A class for segmented sets of consumed references. References are associated with the source positions where they first appeared. References are compared with eq.

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
case class DefInfo(tree: ValOrDefDef, symbol: Symbol, hidden: Refs, hiddenPeaks: Refs)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
class MutConsumedSet extends ConsumedSet

A mutable consumed set, which is initially empty

A mutable consumed set, which is initially empty

Attributes

Supertypes
class ConsumedSet
class Object
trait Matchable
class Any
case class PeaksPair(actual: Refs, hidden: Refs)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
enum TypeRole

The role in which a checked type appears, used for composing error messages

The role in which a checked type appears, used for composing error messages

Attributes

Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Value members

Concrete fields

Extensions

Extensions

extension (ref: CaptureRef)
def peaks(using Context): Refs