@@ -123,6 +123,7 @@ namespace swift {
123123 class Pattern ;
124124 enum PointerTypeKind : unsigned ;
125125 class PrecedenceGroupDecl ;
126+ struct RequirementMatch ;
126127 class TupleTypeElt ;
127128 class EnumElementDecl ;
128129 class ProtocolDecl ;
@@ -1317,6 +1318,19 @@ class ASTContext final {
13171318 std::function<void (NormalProtocolConformance *)> Callback;
13181319 };
13191320
1321+ // / Describes a missing witness during conformance checking.
1322+ class MissingWitness {
1323+ public:
1324+ // / The requirement that is missing a witness.
1325+ ValueDecl *requirement;
1326+
1327+ // / The set of potential matching witnesses.
1328+ std::vector<RequirementMatch> matches;
1329+
1330+ MissingWitness (ValueDecl *requirement,
1331+ ArrayRef<RequirementMatch> matches);
1332+ };
1333+
13201334 // / Check whether current context has any errors associated with
13211335 // / ill-formed protocol conformances which haven't been produced yet.
13221336 // /
@@ -1339,13 +1353,13 @@ class ASTContext final {
13391353 takeDelayedConformanceDiags (NormalProtocolConformance const * conformance);
13401354
13411355 // / Add delayed missing witnesses for the given normal protocol conformance.
1342- void addDelayedMissingWitnesses (
1356+ void addDelayedMissingWitness (
13431357 NormalProtocolConformance *conformance,
1344- std::unique_ptr<MissingWitnessesBase> missingWitnesses );
1358+ MissingWitness missingWitness );
13451359
13461360 // / Retrieve the delayed missing witnesses for the given normal protocol
13471361 // / conformance.
1348- std::unique_ptr<MissingWitnessesBase >
1362+ std::vector<MissingWitness >
13491363 takeDelayedMissingWitnesses (NormalProtocolConformance *conformance);
13501364
13511365 // / Produce a specialized conformance, which takes a generic
0 commit comments