NameResolutionContext
struct NameResolutionContext : Sendable
The context in which a component of a name expression gets resolved.
This structure is used during name resolution to identify the type of which an entity is member and the generic arguments captured by that entity.
-
The type of the receiver.
If
typeis a bound generic type,type.arguments[k] = arguments[k]for all keys intype.Declaration
Swift
let type: AnyType -
The arguments parameterizing the generic environment of the receiver.
This property contains the arguments of
type‘s generic parameters (if any) and the arguments to generic parameters captured by the scope in which name resolution takes place.Declaration
Swift
let arguments: GenericArguments -
The expression of the receiver, unless it is elided.
Declaration
Swift
let receiver: DeclReference.Receiver? -
Creates an instance with the given properties.
Declaration
Swift
init(type: AnyType, arguments: GenericArguments = .empty, receiver: DeclReference.Receiver?)
View on GitHub