@@ -1179,7 +1179,6 @@ bool swift::diagnoseNonSendableTypesInReference(
1179
1179
if (param->isSending () && !paramType->hasError ()) {
1180
1180
continue ;
1181
1181
}
1182
-
1183
1182
if (diagnoseNonSendableTypes (
1184
1183
paramType, fromDC, derivedConformanceType,
1185
1184
refLoc, diagnoseLoc.isInvalid () ? refLoc : diagnoseLoc,
@@ -1194,19 +1193,15 @@ bool swift::diagnoseNonSendableTypesInReference(
1194
1193
if (funcCheckOptions.contains (FunctionCheckKind::Results)) {
1195
1194
// only check results if funcCheckKind specifies so
1196
1195
Type resultType = func->getResultInterfaceType ().subst (subs);
1197
-
1198
1196
auto diag = getSendableResultDiag (refKind);
1199
-
1200
1197
if (diag.ID == diag::non_sendable_result_in_witness.ID &&
1201
1198
func->hasSendingResult () && !resultType->hasError ()) {
1202
1199
return false ;
1203
1200
}
1204
-
1205
1201
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 ()))
1210
1205
return true ;
1211
1206
}
1212
1207
}
0 commit comments