Skip to content

Commit ed63c60

Browse files
committed
use a variable instead
1 parent 5118086 commit ed63c60

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

lib/Sema/TypeCheckConcurrency.cpp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1179,7 +1179,6 @@ bool swift::diagnoseNonSendableTypesInReference(
11791179
if (param->isSending() && !paramType->hasError()) {
11801180
continue;
11811181
}
1182-
11831182
if (diagnoseNonSendableTypes(
11841183
paramType, fromDC, derivedConformanceType,
11851184
refLoc, diagnoseLoc.isInvalid() ? refLoc : diagnoseLoc,
@@ -1194,19 +1193,15 @@ bool swift::diagnoseNonSendableTypesInReference(
11941193
if (funcCheckOptions.contains(FunctionCheckKind::Results)) {
11951194
// only check results if funcCheckKind specifies so
11961195
Type resultType = func->getResultInterfaceType().subst(subs);
1197-
11981196
auto diag = getSendableResultDiag(refKind);
1199-
12001197
if (diag.ID == diag::non_sendable_result_in_witness.ID &&
12011198
func->hasSendingResult() && !resultType->hasError()) {
12021199
return false;
12031200
}
1204-
12051201
if (diagnoseNonSendableTypes(
1206-
resultType, fromDC, derivedConformanceType,
1207-
refLoc, diagnoseLoc.isInvalid() ? refLoc : diagnoseLoc,
1208-
getSendableResultDiag(refKind),
1209-
func, getActorIsolation()))
1202+
resultType, fromDC, derivedConformanceType, refLoc,
1203+
diagnoseLoc.isInvalid() ? refLoc : diagnoseLoc, diag, func,
1204+
getActorIsolation()))
12101205
return true;
12111206
}
12121207
}

0 commit comments

Comments
 (0)