Skip to content

Commit 3400e6b

Browse files
committed
Resolve merge conflict
1 parent d17bc35 commit 3400e6b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/Sema/MiscDiagnostics.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2074,9 +2074,10 @@ static void diagnoseImplicitSelfUseInClosure(const Expr *E,
20742074

20752075
// If the closure's type was inferred to be noescape, then it doesn't
20762076
// need qualification.
2077-
if (AnyFunctionRef(const_cast<AbstractClosureExpr *>(CE))
2078-
.isKnownNoEscape())
2079-
return false;
2077+
if (auto funcTy = CE->getType()->getAs<FunctionType>()) {
2078+
if (funcTy->isNoEscape())
2079+
return false;
2080+
}
20802081

20812082
if (auto autoclosure = dyn_cast<AutoClosureExpr>(CE)) {
20822083
if (autoclosure->getThunkKind() == AutoClosureExpr::Kind::AsyncLet)

0 commit comments

Comments
 (0)