Skip to content

Commit 485ed7b

Browse files
committed
[Generic environment] Weaken an assertion when forming a substitution map.
It turns out that GenericSignature::getAllDependentTypes() sometimes includes generic type parameter types that have been made concrete. Tolerate this for now, because fixing it causes issues elsewhere.
1 parent 10fc3fa commit 485ed7b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/AST/GenericEnvironment.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,9 @@ getSubstitutionMap(SubstitutionList subs) const {
412412
continue;
413413
}
414414

415-
assert(contextTy->hasError());
415+
// FIXME: getAllDependentTypes() includes generic type parameters that
416+
// have been made concrete.
417+
assert(contextTy->hasError() || depTy->is<GenericTypeParamType>());
416418
}
417419

418420
assert(subs.empty() && "did not use all substitutions?!");

0 commit comments

Comments
 (0)