File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -399,7 +399,7 @@ class ApplyClassifier {
399
399
DeclContext *RethrowsDC = nullptr ;
400
400
bool inRethrowsContext () const { return RethrowsDC != nullptr ; }
401
401
402
- // / Check to see if the given function application throws.
402
+ // / Check to see if the given function application throws or is async .
403
403
Classification classifyApply (ApplyExpr *E) {
404
404
// An apply expression is a potential throw site if the function throws.
405
405
// But if the expression didn't type-check, suppress diagnostics.
@@ -461,7 +461,8 @@ class ApplyClassifier {
461
461
if (!type) return Classification::forInvalidCode ();
462
462
463
463
// Use the most significant result from the arguments.
464
- Classification result;
464
+ Classification result = isAsync ? Classification::forAsync ()
465
+ : Classification ();
465
466
for (auto arg : llvm::reverse (args)) {
466
467
auto fnType = type->getAs <AnyFunctionType>();
467
468
if (!fnType) return Classification::forInvalidCode ();
You can’t perform that action at this time.
0 commit comments