Skip to content

Commit d5b3d04

Browse files
committed
use a variable instead
1 parent 43ff772 commit d5b3d04

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
@@ -1187,7 +1187,6 @@ bool swift::diagnoseNonSendableTypesInReference(
11871187
if (param->isSending() && !paramType->hasError()) {
11881188
continue;
11891189
}
1190-
11911190
if (diagnoseNonSendableTypes(
11921191
paramType, fromDC, derivedConformanceType,
11931192
refLoc, diagnoseLoc.isInvalid() ? refLoc : diagnoseLoc,
@@ -1202,19 +1201,15 @@ bool swift::diagnoseNonSendableTypesInReference(
12021201
if (funcCheckOptions.contains(FunctionCheckKind::Results)) {
12031202
// only check results if funcCheckKind specifies so
12041203
Type resultType = func->getResultInterfaceType().subst(subs);
1205-
12061204
auto diag = getSendableResultDiag(refKind);
1207-
12081205
if (diag.ID == diag::non_sendable_result_in_witness.ID &&
12091206
func->hasSendingResult() && !resultType->hasError()) {
12101207
return false;
12111208
}
1212-
12131209
if (diagnoseNonSendableTypes(
1214-
resultType, fromDC, derivedConformanceType,
1215-
refLoc, diagnoseLoc.isInvalid() ? refLoc : diagnoseLoc,
1216-
getSendableResultDiag(refKind),
1217-
func, getActorIsolation()))
1210+
resultType, fromDC, derivedConformanceType, refLoc,
1211+
diagnoseLoc.isInvalid() ? refLoc : diagnoseLoc, diag, func,
1212+
getActorIsolation()))
12181213
return true;
12191214
}
12201215
}

0 commit comments

Comments
 (0)