checkConformance(to:declaredBy:)
private mutating func checkConformance(
to trait: TraitType, declaredBy origin: ConformanceOrigin
)
Type checks the conformance to trait declared by origin.
Requires
Conformances to traits strictly refined by trait have already been checked.
Parameters
trait
|
A trait belonging to the refinement closure of a trait mentioned |
origin
|
A declaration introducing a conformance to |
-
The information describing how to refer to and use an entity.
Declaration
Swift
typealias API = (type: AnyType, name: Name, parameters: [GenericParameterDecl.ID]) -
Returns the API of
mviewed as a member ofmodelthrough its conformance totrait. -
Returns the type of
mviewed as a member ofmodelthrough its conformance totrait. -
Checks whether the constraints on the requirements of
traitare satisfied bymodelinscopeOfuse, reporting diagnostics inconformanceDiagnostics.Declaration
Swift
func checkRequirementConstraints() -> Bool -
Identifies the implementation of
requirementformodel.If an implementation is found, it is written to
implementations. Otherwise, a diagnostic is reported inconformanceDiagnostics.Declaration
Swift
func resolveImplementation(of requirement: AnyDeclID) -
Identifies the implementation of
requirementformodel.Declaration
Swift
func resolveAssociatedImplementation(of requirement: AssociatedTypeDecl.ID) -
Identifies the implementation of
requirementformodel.requirementis a function, initializer, or subscript requirement.Declaration
Swift
func resolveFunctionalImplementation(of requirement: AnyDeclID) -
Returns a synthetic implementation of
requirementformodelwith givenexpectedAPI, ornilif no such implementation can be synthesized.Declaration
Swift
func syntheticImplementation( of requirement: AnyDeclID, withAPI expectedAPI: API ) -> SynthesizedFunctionDecl? -
Returns a concrete implementation of
requirementformodelwith givenexpectedAPI, ornilif no such implementation exists.Declaration
-
Returns the implementation of
requirementinmodelornilif there’s none.Declaration
Swift
func implementation(of requirement: AssociatedTypeDecl.ID) -> AnyDeclID? -
Returns the implementation of
requirementinmodelornilif there’s none.Declaration
Parameters
expectedAPIThe API
requirementis expected to have when implemented bymodel.idKindThe kind of declarations to be considered as candidates.
appendDefinitionsA closure called for each candidate in the declaration space of
modelto gather those that are definitions (i.e., declarations with a body) of an entity with the givenexpectedAPI. -
Returns the contents of
candidatesif it contains a single declaration, reporting a diagnostic if it doesn’t have the right visibility. Otherwise, returnsnil. -
Appends the function definitions of
dthat have APIatos.Declaration
-
Appends each variant of
dthat is has APIatos.Declaration
Swift
func appendDefinitions(of d: MethodDecl.ID, matching a: API, to s: inout [AnyDeclID]) -
Appends each variant of
dthat is has APIatos.Declaration
Swift
func appendDefinitions(of d: SubscriptDecl.ID, matching a: API, to s: inout [AnyDeclID]) -
Appends
dtosiffdis a definition with with APIa.Declaration
View on GitHub