Scopes

dotty.tools.dotc.core.Scopes
object Scopes

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Scopes.type

Members list

Type members

Classlikes

object EmptyScope extends Scope

The empty scope (immutable).

The empty scope (immutable).

Attributes

Supertypes
class Scope
trait Showable
class Object
trait Matchable
class Any
Self type
EmptyScope.type
class MutableScope extends Scope

A subclass of Scope that defines methods for entering and unlinking entries. Note: constructor is protected to force everyone to use the factory methods newScope or newNestedScope instead. This is necessary because when run from reflection every scope needs to have a SynchronizedScope as mixin.

A subclass of Scope that defines methods for entering and unlinking entries. Note: constructor is protected to force everyone to use the factory methods newScope or newNestedScope instead. This is necessary because when run from reflection every scope needs to have a SynchronizedScope as mixin.

Attributes

Supertypes
class Scope
trait Showable
class Object
trait Matchable
class Any
Known subtypes
class PackageScope
abstract class Scope extends Showable

A scope contains a set of symbols. It can be an extension of some outer scope, from which it inherits all symbols. This class does not have any methods to add symbols to a scope or to delete them. These methods are provided by subclass MutableScope.

A scope contains a set of symbols. It can be an extension of some outer scope, from which it inherits all symbols. This class does not have any methods to add symbols to a scope or to delete them. These methods are provided by subclass MutableScope.

Attributes

Supertypes
trait Showable
class Object
trait Matchable
class Any
Known subtypes
object EmptyScope
class MutableScope
class PackageScope
class ScopeEntry

Attributes

Supertypes
class Object
trait Matchable
class Any

Types

A function that optionally produces synthesized symbols with the given name in the given context. Returns NoSymbol if the no symbol should be synthesized for the given name.

A function that optionally produces synthesized symbols with the given name in the given context. Returns NoSymbol if the no symbol should be synthesized for the given name.

Attributes

Value members

Concrete methods

Create a new scope nested in another one with which it shares its elements

Create a new scope nested in another one with which it shares its elements

Attributes

Create a new scope

Create a new scope

Attributes

def newScope(nestingLevel: Int): MutableScope
def newScopeWith(elems: Symbol*)(using Context): MutableScope

Create a new scope with given initial elements

Create a new scope with given initial elements

Attributes

Transform scope of members of owner using operation op This is overridden by the reflective compiler to avoid creating new scopes for packages

Transform scope of members of owner using operation op This is overridden by the reflective compiler to avoid creating new scopes for packages

Attributes

Concrete fields

inline val MinHashedScopeSize: 8

A hashtable is created once current size exceeds MinHash * FillFactor The initial hash table has twice that size (i.e 16). This value must be a power of two, so that the index of an element can be computed as element.hashCode & (hashTable.length - 1)

A hashtable is created once current size exceeds MinHash * FillFactor The initial hash table has twice that size (i.e 16). This value must be a power of two, so that the index of an element can be computed as element.hashCode & (hashTable.length - 1)

Attributes