Skip to content

Commit 42e07aa

Browse files
authored
Merge pull request #27773 from compnerd/27764
2 parents 14d9011 + 5fe38b6 commit 42e07aa

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

lib/AST/Decl.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2812,11 +2812,12 @@ Type ValueDecl::getInterfaceType() const {
28122812
return TypeAndAccess.getPointer();
28132813
}
28142814

2815-
auto ty =
2816-
evaluateOrDefault(getASTContext().evaluator,
2817-
InterfaceTypeRequest{const_cast<ValueDecl *>(this)},
2818-
ErrorType::get(getASTContext()));
2819-
return ty ?: ErrorType::get(getASTContext());
2815+
if (auto Ty =
2816+
evaluateOrDefault(getASTContext().evaluator,
2817+
InterfaceTypeRequest{const_cast<ValueDecl *>(this)},
2818+
ErrorType::get(getASTContext())))
2819+
return Ty;
2820+
return ErrorType::get(getASTContext());
28202821
}
28212822

28222823
void ValueDecl::setInterfaceType(Type type) {

0 commit comments

Comments
 (0)