mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-22 01:37:59 +02:00
Fix for CheckMethod vtable check in autocomplete
This commit is contained in:
parent
066a83e60b
commit
32cfb8733f
1 changed files with 12 additions and 4 deletions
|
@ -1673,11 +1673,19 @@ bool BfMethodMatcher::CheckMethod(BfTypeInstance* targetTypeInstance, BfTypeInst
|
|||
if ((methodInstance->mVirtualTableIdx < targetTypeInstance->mVirtualMethodTable.mSize) && (methodInstance->mVirtualTableIdx >= 0))
|
||||
{
|
||||
BfVirtualMethodEntry& vEntry = targetTypeInstance->mVirtualMethodTable[methodInstance->mVirtualTableIdx];
|
||||
auto implMethod = (BfMethodInstance*)vEntry.mImplementingMethod;
|
||||
if ((implMethod != methodInstance) && (implMethod != NULL))
|
||||
if ((vEntry.mImplementingMethod.mTypeInstance != NULL) && (vEntry.mImplementingMethod.mTypeInstance->mDefineState < BfTypeDefineState_DefinedAndMethodsSlotted) &&
|
||||
(mModule->mCompiler->IsAutocomplete()))
|
||||
{
|
||||
SetAndRestoreValue<bool> prevBypassVirtual(mBypassVirtual, true);
|
||||
return CheckMethod(targetTypeInstance, implMethod->GetOwner(), implMethod->mMethodDef, isFailurePass);
|
||||
// Silently ignore
|
||||
}
|
||||
else
|
||||
{
|
||||
auto implMethod = (BfMethodInstance*)vEntry.mImplementingMethod;
|
||||
if ((implMethod != methodInstance) && (implMethod != NULL))
|
||||
{
|
||||
SetAndRestoreValue<bool> prevBypassVirtual(mBypassVirtual, true);
|
||||
return CheckMethod(targetTypeInstance, implMethod->GetOwner(), implMethod->mMethodDef, isFailurePass);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue