Skip to content

Commit 5fc282d

Browse files
committed
[NFC] TypeChecker: Allow to pass SubstOptions to the non-diagnosing 'checkGenericArguments'
1 parent 7c226dd commit 5fc282d

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

lib/Sema/TypeCheckGeneric.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -933,13 +933,14 @@ RequirementCheckResult TypeChecker::checkGenericArguments(
933933
RequirementCheckResult
934934
TypeChecker::checkGenericArguments(ModuleDecl *module,
935935
ArrayRef<Requirement> requirements,
936-
TypeSubstitutionFn substitutions) {
936+
TypeSubstitutionFn substitutions,
937+
SubstOptions options) {
937938
SmallVector<Requirement, 4> worklist;
938939
bool valid = true;
939940

940941
for (auto req : requirements) {
941942
if (auto resolved = req.subst(substitutions,
942-
LookUpConformanceInModule(module))) {
943+
LookUpConformanceInModule(module), options)) {
943944
worklist.push_back(*resolved);
944945
} else {
945946
valid = false;

lib/Sema/TypeChecker.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,8 @@ RequirementCheckResult checkGenericArguments(
484484
RequirementCheckResult checkGenericArguments(
485485
ModuleDecl *module,
486486
ArrayRef<Requirement> requirements,
487-
TypeSubstitutionFn substitutions);
487+
TypeSubstitutionFn substitutions,
488+
SubstOptions options = None);
488489

489490
/// Checks whether the generic requirements imposed on the nested type
490491
/// declaration \p decl (if present) are in agreement with the substitutions

0 commit comments

Comments
 (0)