1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 03:28:20 +02:00

Better interface method matching when names match

This commit is contained in:
Fusioon 2025-03-14 01:37:00 +01:00
parent 27620fa35d
commit a0827cd4bf

View file

@ -26733,12 +26733,17 @@ bool BfModule::SlotVirtualMethod(BfMethodInstance* methodInstance, BfAmbiguityCo
bool isBetter = false;
bool isWorse = false;
isBetter = (methodInstance->mMethodInfoEx != NULL) && (methodInstance->mMethodInfoEx->mExplicitInterface != NULL);
isWorse = (prevMethod->mMethodInfoEx != NULL) && (prevMethod->mMethodInfoEx->mExplicitInterface != NULL);
isBetter = methodInstance->mReturnType == iMethodInst->mReturnType;
isWorse = prevMethod->mReturnType == iMethodInst->mReturnType;
if (isBetter == isWorse)
{
isBetter = methodInstance->mReturnType == iMethodInst->mReturnType;
isWorse = prevMethod->mReturnType == iMethodInst->mReturnType;
isBetter = (methodInstance->mMethodInfoEx != NULL) && (methodInstance->mMethodInfoEx->mExplicitInterface != NULL);
isWorse = (prevMethod->mMethodInfoEx != NULL) && (prevMethod->mMethodInfoEx->mExplicitInterface != NULL);
if ((isBetter) && (isWorse))
{
isBetter = methodInstance->mMethodInfoEx->mExplicitInterface == ifaceInst;
isWorse = prevMethod->mMethodInfoEx->mExplicitInterface == ifaceInst;
}
}
if (isBetter == isWorse)