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.
null
AbstractClosureExpr::getResultType
getType
1 parent b244fa6 commit 7bfcbfeCopy full SHA for 7bfcbfe
lib/AST/Expr.cpp
@@ -1931,10 +1931,11 @@ void AbstractClosureExpr::setParameterList(ParameterList *P) {
1931
Type AbstractClosureExpr::getResultType(
1932
llvm::function_ref<Type(Expr *)> getType) const {
1933
auto *E = const_cast<AbstractClosureExpr *>(this);
1934
- if (getType(E)->hasError())
1935
- return getType(E);
+ Type T = getType(E);
+ if (!T || T->hasError())
1936
+ return T;
1937
- return getType(E)->castTo<FunctionType>()->getResult();
1938
+ return T->castTo<FunctionType>()->getResult();
1939
}
1940
1941
bool AbstractClosureExpr::isBodyThrowing() const {
0 commit comments