diff --git a/IDEHelper/Compiler/BfModule.cpp b/IDEHelper/Compiler/BfModule.cpp index a5f7b2ab..20773b31 100644 --- a/IDEHelper/Compiler/BfModule.cpp +++ b/IDEHelper/Compiler/BfModule.cpp @@ -26742,12 +26742,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)