Skip to content

Commit

Permalink
Also check for covariant return types if both of them are generic
Browse files Browse the repository at this point in the history
  • Loading branch information
stakx committed Dec 29, 2022
1 parent be22332 commit a1b44d7
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,12 @@ private bool EqualSignatureTypes(Type x, Type y, MethodInfo xm = null, MethodInf
return false;
}

for (var i = 0; i < xArgs.Length; ++i)
if (IsCovariantReturnTypes(x, y, xm, ym) == false)
{
if(!EqualSignatureTypes(xArgs[i], yArgs[i])) return false;
for (var i = 0; i < xArgs.Length; ++i)
{
if(!EqualSignatureTypes(xArgs[i], yArgs[i])) return false;
}
}
}
else
Expand Down

0 comments on commit a1b44d7

Please sign in to comment.