@@ -823,10 +823,7 @@ class ModuleDecl
823823 DeclName name,
824824 SmallVectorImpl<ValueDecl*> &results) const ;
825825
826- // / Look for the conformance of the given type to the given protocol.
827- // /
828- // / This routine determines whether the given \c type conforms to the given
829- // / \c protocol.
826+ // / Global conformance lookup, does not check conditional requirements.
830827 // /
831828 // / \param type The type for which we are computing conformance.
832829 // /
@@ -836,23 +833,33 @@ class ModuleDecl
836833 // / might include "missing" conformances, which are synthesized for some
837834 // / protocols as an error recovery mechanism.
838835 // /
839- // / \returns The result of the conformance search, which will be
840- // / None if the type does not conform to the protocol or contain a
841- // / ProtocolConformanceRef if it does conform.
836+ // / \returns An invalid conformance if the search failed, otherwise an
837+ // / abstract, concrete or pack conformance, depending on the lookup type.
842838 ProtocolConformanceRef lookupConformance (Type type, ProtocolDecl *protocol,
843839 bool allowMissing = false );
844840
841+ // / Global conformance lookup, checks conditional requirements.
842+ // /
843+ // / \param type The type for which we are computing conformance. Must not
844+ // / contain type parameters.
845+ // /
846+ // / \param protocol The protocol to which we are computing conformance.
847+ // /
848+ // / \param allowMissing When \c true, the resulting conformance reference
849+ // / might include "missing" conformances, which are synthesized for some
850+ // / protocols as an error recovery mechanism.
851+ // /
852+ // / \returns An invalid conformance if the search failed, otherwise an
853+ // / abstract, concrete or pack conformance, depending on the lookup type.
854+ ProtocolConformanceRef checkConformance (Type type, ProtocolDecl *protocol,
855+ // Note: different default than above
856+ bool allowMissing = true );
857+
845858 // / Look for the conformance of the given existential type to the given
846859 // / protocol.
847860 ProtocolConformanceRef lookupExistentialConformance (Type type,
848861 ProtocolDecl *protocol);
849862
850- // / Exposes TypeChecker functionality for querying protocol conformance.
851- // / Returns a valid ProtocolConformanceRef only if all conditional
852- // / requirements are successfully resolved.
853- ProtocolConformanceRef conformsToProtocol (Type sourceTy,
854- ProtocolDecl *targetProtocol);
855-
856863 // / Collect the conformances of \c fromType to each of the protocols of an
857864 // / existential type's layout.
858865 // /
0 commit comments