AST: Add ProtocolConformanceRef::getTypeWitness()

This commit is contained in:
Slava Pestov
2024-09-18 11:36:25 -04:00
parent a27d6cf741
commit 508dacc3a2
2 changed files with 46 additions and 0 deletions

View File

@@ -170,6 +170,11 @@ public:
/// Map contextual types to interface types in the conformance.
ProtocolConformanceRef mapConformanceOutOfContext() const;
/// Look up the type witness for an associated type declaration in this
/// conformance.
Type getTypeWitness(Type origType, AssociatedTypeDecl *assocType,
SubstOptions options = std::nullopt) const;
/// Given a dependent type (expressed in terms of this conformance's
/// protocol), follow it from the conforming type.
Type getAssociatedType(Type origType, Type dependentType) const;