@@ -1187,7 +1187,6 @@ bool swift::diagnoseNonSendableTypesInReference(
1187
1187
if (param->isSending () && !paramType->hasError ()) {
1188
1188
continue ;
1189
1189
}
1190
-
1191
1190
if (diagnoseNonSendableTypes (
1192
1191
paramType, fromDC, derivedConformanceType,
1193
1192
refLoc, diagnoseLoc.isInvalid () ? refLoc : diagnoseLoc,
@@ -1202,19 +1201,15 @@ bool swift::diagnoseNonSendableTypesInReference(
1202
1201
if (funcCheckOptions.contains (FunctionCheckKind::Results)) {
1203
1202
// only check results if funcCheckKind specifies so
1204
1203
Type resultType = func->getResultInterfaceType ().subst (subs);
1205
-
1206
1204
auto diag = getSendableResultDiag (refKind);
1207
-
1208
1205
if (diag.ID == diag::non_sendable_result_in_witness.ID &&
1209
1206
func->hasSendingResult () && !resultType->hasError ()) {
1210
1207
return false ;
1211
1208
}
1212
-
1213
1209
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 ()))
1218
1213
return true ;
1219
1214
}
1220
1215
}
0 commit comments