mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 11:38:21 +02:00
Better interface method matching when names match
This commit is contained in:
parent
27620fa35d
commit
a0827cd4bf
1 changed files with 9 additions and 4 deletions
|
@ -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);
|
||||
if (isBetter == isWorse)
|
||||
{
|
||||
isBetter = methodInstance->mReturnType == iMethodInst->mReturnType;
|
||||
isWorse = prevMethod->mReturnType == iMethodInst->mReturnType;
|
||||
if (isBetter == isWorse)
|
||||
{
|
||||
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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue