Skip to content

Commit ab1ce91

Browse files
committed
add isAsync param to forRethrowingOnly for consistency with forThrow
1 parent 3609656 commit ab1ce91

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/Sema/TypeCheckEffects.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,10 +395,11 @@ class Classification {
395395
return result;
396396
}
397397

398-
static Classification forRethrowingOnly(PotentialThrowReason reason) {
398+
static Classification forRethrowingOnly(PotentialThrowReason reason, bool isAsync) {
399399
Classification result;
400400
result.Result = ThrowingKind::RethrowingOnly;
401401
result.Reason = reason;
402+
result.IsAsync = isAsync;
402403
return result;
403404
}
404405

@@ -563,7 +564,7 @@ class ApplyClassifier {
563564
// If we're currently doing rethrows-checking on the body of the
564565
// function which declares the parameter, it's rethrowing-only.
565566
if (param->getDeclContext() == RethrowsDC)
566-
return Classification::forRethrowingOnly(reason);
567+
return Classification::forRethrowingOnly(reason, /*async*/false);
567568

568569
// Otherwise, it throws unconditionally.
569570
return Classification::forThrow(reason, /*async*/false);

0 commit comments

Comments
 (0)