@@ -278,52 +278,6 @@ struct ParentConditionalConformance {
278
278
ArrayRef<ParentConditionalConformance> conformances);
279
279
};
280
280
281
- // / An abstract interface that is used by `checkGenericArguments`.
282
- class GenericRequirementsCheckListener {
283
- public:
284
- virtual ~GenericRequirementsCheckListener ();
285
-
286
- // / Callback invoked before trying to check generic requirement placed
287
- // / between given types. Note: if either of the types assigned to the
288
- // / requirement is generic parameter or dependent member, this callback
289
- // / method is going to get their substitutions.
290
- // /
291
- // / \param kind The kind of generic requirement to check.
292
- // /
293
- // / \param first The left-hand side type assigned to the requirement,
294
- // / possibly represented by its generic substitute.
295
- // /
296
- // / \param second The right-hand side type assigned to the requirement,
297
- // / possibly represented by its generic substitute.
298
- // /
299
- // /
300
- // / \returns true if it's ok to validate requirement, false otherwise.
301
- virtual bool shouldCheck (RequirementKind kind, Type first, Type second);
302
-
303
- // / Callback to report the result of a satisfied conformance requirement.
304
- // /
305
- // / \param depTy The dependent type, from the signature.
306
- // / \param replacementTy The type \c depTy was replaced with.
307
- // / \param conformance The conformance itself.
308
- virtual void satisfiedConformance (Type depTy, Type replacementTy,
309
- ProtocolConformanceRef conformance);
310
-
311
- // / Callback to diagnose problem with unsatisfied generic requirement.
312
- // /
313
- // / \param req The unsatisfied generic requirement.
314
- // /
315
- // / \param first The left-hand side type assigned to the requirement,
316
- // / possibly represented by its generic substitute.
317
- // /
318
- // / \param second The right-hand side type assigned to the requirement,
319
- // / possibly represented by its generic substitute.
320
- // /
321
- // / \returns true if problem has been diagnosed, false otherwise.
322
- virtual bool diagnoseUnsatisfiedRequirement (
323
- const Requirement &req, Type first, Type second,
324
- ArrayRef<ParentConditionalConformance> parents);
325
- };
326
-
327
281
// / The result of `checkGenericRequirement`.
328
282
enum class RequirementCheckResult {
329
283
Success, Failure, SubstitutionFailure
@@ -633,13 +587,10 @@ std::string gatherGenericParamBindingsText(
633
587
// / \param requirements The requirements against which the generic arguments
634
588
// / should be checked.
635
589
// / \param substitutions Substitutions from interface types of the signature.
636
- // / \param listener The generic check listener used to pick requirements and
637
- // / notify callers about diagnosed errors.
638
590
RequirementCheckResult checkGenericArguments (
639
591
DeclContext *dc, SourceLoc loc, SourceLoc noteLoc, Type owner,
640
592
TypeArrayView<GenericTypeParamType> genericParams,
641
593
ArrayRef<Requirement> requirements, TypeSubstitutionFn substitutions,
642
- GenericRequirementsCheckListener *listener = nullptr ,
643
594
SubstOptions options = None);
644
595
645
596
// / Add any implicitly-defined constructors required for the given
0 commit comments