1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 12:32:20 +02:00

Fixed IsCompatibleInterfaceMethod case with generic params

This commit is contained in:
Brian Fiete 2022-03-21 11:56:11 -07:00
parent 18794e7db6
commit 7958b3a38d

View file

@ -13248,6 +13248,9 @@ bool BfModule::StrictCompareMethodSignatures(BfMethodInstance* methodA, BfMethod
bool BfModule::IsCompatibleInterfaceMethod(BfMethodInstance* iMethodInst, BfMethodInstance* methodInstance)
{
if ((iMethodInst->GetNumGenericParams() != 0) || (methodInstance->GetNumGenericParams() != 0))
return false;
if (iMethodInst->mMethodDef->mName != methodInstance->mMethodDef->mName)
return false;
@ -24635,7 +24638,7 @@ bool BfModule::SlotVirtualMethod(BfMethodInstance* methodInstance, BfAmbiguityCo
hadNameMatch = iMethodInst;
bool doesMethodSignatureMatch = CompareMethodSignatures(iMethodInst, methodInstance);
if ((!doesMethodSignatureMatch) && (iMethodInst->GetNumGenericParams() == 0) && (interfaceMethodEntry->mMethodRef.IsNull()))
if ((!doesMethodSignatureMatch) && (interfaceMethodEntry->mMethodRef.IsNull()))
{
doesMethodSignatureMatch = IsCompatibleInterfaceMethod(iMethodInst, methodInstance);
}