@@ -123,6 +123,7 @@ namespace swift {
123
123
class Pattern ;
124
124
enum PointerTypeKind : unsigned ;
125
125
class PrecedenceGroupDecl ;
126
+ struct RequirementMatch ;
126
127
class TupleTypeElt ;
127
128
class EnumElementDecl ;
128
129
class ProtocolDecl ;
@@ -1317,6 +1318,19 @@ class ASTContext final {
1317
1318
std::function<void (NormalProtocolConformance *)> Callback;
1318
1319
};
1319
1320
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
+
1320
1334
// / Check whether current context has any errors associated with
1321
1335
// / ill-formed protocol conformances which haven't been produced yet.
1322
1336
// /
@@ -1339,13 +1353,13 @@ class ASTContext final {
1339
1353
takeDelayedConformanceDiags (NormalProtocolConformance const * conformance);
1340
1354
1341
1355
// / Add delayed missing witnesses for the given normal protocol conformance.
1342
- void addDelayedMissingWitnesses (
1356
+ void addDelayedMissingWitness (
1343
1357
NormalProtocolConformance *conformance,
1344
- std::unique_ptr<MissingWitnessesBase> missingWitnesses );
1358
+ MissingWitness missingWitness );
1345
1359
1346
1360
// / Retrieve the delayed missing witnesses for the given normal protocol
1347
1361
// / conformance.
1348
- std::unique_ptr<MissingWitnessesBase >
1362
+ std::vector<MissingWitness >
1349
1363
takeDelayedMissingWitnesses (NormalProtocolConformance *conformance);
1350
1364
1351
1365
// / Produce a specialized conformance, which takes a generic
0 commit comments