mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-22 09:38:01 +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,6 +1673,13 @@ bool BfMethodMatcher::CheckMethod(BfTypeInstance* targetTypeInstance, BfTypeInst
|
||||||
if ((methodInstance->mVirtualTableIdx < targetTypeInstance->mVirtualMethodTable.mSize) && (methodInstance->mVirtualTableIdx >= 0))
|
if ((methodInstance->mVirtualTableIdx < targetTypeInstance->mVirtualMethodTable.mSize) && (methodInstance->mVirtualTableIdx >= 0))
|
||||||
{
|
{
|
||||||
BfVirtualMethodEntry& vEntry = targetTypeInstance->mVirtualMethodTable[methodInstance->mVirtualTableIdx];
|
BfVirtualMethodEntry& vEntry = targetTypeInstance->mVirtualMethodTable[methodInstance->mVirtualTableIdx];
|
||||||
|
if ((vEntry.mImplementingMethod.mTypeInstance != NULL) && (vEntry.mImplementingMethod.mTypeInstance->mDefineState < BfTypeDefineState_DefinedAndMethodsSlotted) &&
|
||||||
|
(mModule->mCompiler->IsAutocomplete()))
|
||||||
|
{
|
||||||
|
// Silently ignore
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
auto implMethod = (BfMethodInstance*)vEntry.mImplementingMethod;
|
auto implMethod = (BfMethodInstance*)vEntry.mImplementingMethod;
|
||||||
if ((implMethod != methodInstance) && (implMethod != NULL))
|
if ((implMethod != methodInstance) && (implMethod != NULL))
|
||||||
{
|
{
|
||||||
|
@ -1680,6 +1687,7 @@ bool BfMethodMatcher::CheckMethod(BfTypeInstance* targetTypeInstance, BfTypeInst
|
||||||
return CheckMethod(targetTypeInstance, implMethod->GetOwner(), implMethod->mMethodDef, isFailurePass);
|
return CheckMethod(targetTypeInstance, implMethod->GetOwner(), implMethod->mMethodDef, isFailurePass);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Being in autocomplete mode is the only excuse for not having the virtual method table slotted
|
// Being in autocomplete mode is the only excuse for not having the virtual method table slotted
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue