We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b047c36 commit cedc0b5Copy full SHA for cedc0b5
lib/AST/GenericSignatureBuilder.cpp
@@ -4631,9 +4631,9 @@ ConstraintResult GenericSignatureBuilder::addTypeRequirement(
4631
Impl->HadAnyError = true;
4632
4633
bool shouldOfferFixit = false;
4634
- if (auto decl = subjectType->getAs<GenericTypeParamType>()) {
4635
- shouldOfferFixit = cast<ExtensionDecl>(decl->getDecl()
4636
- ->getDeclContext());
+ if (auto GTPT = subjectType->getAs<GenericTypeParamType>()) {
+ shouldOfferFixit = dyn_cast<ExtensionDecl>(GTPT->getDecl()
+ ->getDeclContext());
4637
}
4638
4639
if (shouldOfferFixit) {
0 commit comments