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 b51ad81 commit 7b9c079Copy full SHA for 7b9c079
lib/AST/Decl.cpp
@@ -963,8 +963,10 @@ AbstractFunctionDecl::getEffectiveThrownErrorType() const {
963
interfaceType = fnType->getResult();
964
}
965
966
- return interfaceType->castTo<AnyFunctionType>()
967
- ->getEffectiveThrownErrorType();
+ if (auto fnType = interfaceType->getAs<AnyFunctionType>())
+ return fnType->getEffectiveThrownErrorType();
968
+
969
+ return llvm::None;
970
971
972
Expr *AbstractFunctionDecl::getSingleExpressionBody() const {
0 commit comments