resolve(_:specializedBy:in:exposedTo:usedAs:)
mutating func resolve(
_ name: SourceRepresentable<Name>, specializedBy arguments: [CompileTimeValue],
in context: NameResolutionContext?, exposedTo scopeOfUse: AnyScopeID, usedAs purpose: NameUse
) -> NameResolutionResult.CandidateSet
Returns the declarations of name exposed to scopeOfUse and specialized by arguments.
The return value is a set of candidates, each of which corresponding to one possible way to
resolve name to a specific declaration. The declarations are searched with an unqualified
lookup unless context is set, in which case they are searched in the declaration space of
context.type. The specialization of generic is obtained by appending arguments to
parent.arguments.
If name resolves to an initializer and purpose is .constructor, the corresponding
candidate is assigned a constructor type. If purpose has call labels, they are used to
filter candidates with different labels.
-
If
isQualifiedistrue, returns the declarations indsthat are accessible with qualification inscopeOfUse. Otherwise, returnsds.
View on GitHub