mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 19:48:20 +02:00
Merge pull request #2189 from Fusioon/fix-#1865
Better interface method matching when names match
This commit is contained in:
commit
4693290c1d
1 changed files with 9 additions and 4 deletions
|
@ -26742,12 +26742,17 @@ bool BfModule::SlotVirtualMethod(BfMethodInstance* methodInstance, BfAmbiguityCo
|
||||||
|
|
||||||
bool isBetter = false;
|
bool isBetter = false;
|
||||||
bool isWorse = 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;
|
isBetter = methodInstance->mReturnType == iMethodInst->mReturnType;
|
||||||
isWorse = prevMethod->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)
|
if (isBetter == isWorse)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue