mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 04:22:20 +02:00
Fixed issue where we allowed multiple semicolons at end of if statements
This commit is contained in:
parent
76cb117e1f
commit
2c30afbfcf
4 changed files with 31 additions and 8 deletions
|
@ -1176,12 +1176,23 @@ bool BfMethodMatcher::CheckMethod(BfTypeInstance* targetTypeInstance, BfTypeInst
|
|||
(targetTypeInstance != NULL) && (targetTypeInstance->IsObject()))
|
||||
{
|
||||
mModule->PopulateType(targetTypeInstance, BfPopulateType_DataAndMethods);
|
||||
BfVirtualMethodEntry& vEntry = targetTypeInstance->mVirtualMethodTable[methodInstance->mVirtualTableIdx];
|
||||
auto implMethod = (BfMethodInstance*)vEntry.mImplementingMethod;
|
||||
if (implMethod != methodInstance)
|
||||
if ((methodInstance->mVirtualTableIdx < targetTypeInstance->mVirtualMethodTable.mSize) && (methodInstance->mVirtualTableIdx >= 0))
|
||||
{
|
||||
SetAndRestoreValue<bool> prevBypassVirtual(mBypassVirtual, true);
|
||||
return CheckMethod(targetTypeInstance, implMethod->GetOwner(), implMethod->mMethodDef, isFailurePass);
|
||||
BfVirtualMethodEntry& vEntry = targetTypeInstance->mVirtualMethodTable[methodInstance->mVirtualTableIdx];
|
||||
auto implMethod = (BfMethodInstance*)vEntry.mImplementingMethod;
|
||||
if (implMethod != methodInstance)
|
||||
{
|
||||
SetAndRestoreValue<bool> prevBypassVirtual(mBypassVirtual, true);
|
||||
return CheckMethod(targetTypeInstance, implMethod->GetOwner(), implMethod->mMethodDef, isFailurePass);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Being in autocomplete mode is the only excuse for not having the virtual method table slotted
|
||||
if ((!mModule->mCompiler->IsAutocomplete()) && (!targetTypeInstance->mTypeFailed))
|
||||
{
|
||||
mModule->AssertErrorState();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue