File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -3226,14 +3226,12 @@ bool swift::conflicting(const OverloadSignature& sig1,
3226
3226
// versions, as that is what the async overloading aimed to address.
3227
3227
//
3228
3228
// Note also, that overloading on throws is already illegal anyway.
3229
- if (sig1.IsDistributed || sig2.IsDistributed ) {
3230
- if (sig1.IsAsyncFunction != sig2.IsAsyncFunction )
3231
- return true ;
3232
- } else {
3233
- // Otherwise one is an async function and the other is not, they don't conflict.
3229
+ if (!sig1.IsDistributed && !sig2.IsDistributed ) {
3230
+ // For non-distributed functions,
3231
+ // if one is an async function and the other is not, they don't conflict.
3234
3232
if (sig1.IsAsyncFunction != sig2.IsAsyncFunction )
3235
3233
return false ;
3236
- }
3234
+ } // else, if any of the methods was distributed, continue checking
3237
3235
3238
3236
// If one is a macro and the other is not, they can't conflict.
3239
3237
if (sig1.IsMacro != sig2.IsMacro )
You can’t perform that action at this time.
0 commit comments