Skip to content

Commit b4e75d1

Browse files
committed
Sema: Look through FunctionConversionExpr in getEnclosingApplyExpr().
Follow up to #61481. There is already a test case exercising this case but there happens to be no observable difference in the compiler output because `noasync` diagnostics already gracefully fall back to looking up the diagnostic `SourceLoc` another way. Resolves rdar://100883622.
1 parent 44489c7 commit b4e75d1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/Sema/TypeCheckAvailability.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3394,7 +3394,8 @@ class ExprAvailabilityWalker : public ASTWalker {
33943394
isa<SelfApplyExpr>(parents[idx]) || // obj.f(a)
33953395
isa<IdentityExpr>(parents[idx]) || // (f)(a)
33963396
isa<ForceValueExpr>(parents[idx]) || // f!(a)
3397-
isa<BindOptionalExpr>(parents[idx])); // f?(a)
3397+
isa<BindOptionalExpr>(parents[idx]) || // f?(a)
3398+
isa<FunctionConversionExpr>(parents[idx]));
33983399

33993400
auto *call = dyn_cast<ApplyExpr>(parents[idx]);
34003401
if (!call || call->getFn() != parents[idx+1])

0 commit comments

Comments
 (0)