mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 19:48:20 +02:00
Fixed interface link error when base class is not instantiated
This commit is contained in:
parent
b094bf4002
commit
1aa66761ad
1 changed files with 29 additions and 17 deletions
|
@ -4948,7 +4948,16 @@ void BfCompiler::PopulateReified()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto& ifaceTypeInst : typeInst->mInterfaces)
|
auto checkType = typeInst;
|
||||||
|
while (checkType != NULL)
|
||||||
|
{
|
||||||
|
if ((checkType != typeInst) && (checkType->mHasBeenInstantiated))
|
||||||
|
{
|
||||||
|
// We will already check this type here in its own loop
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (auto& ifaceTypeInst : checkType->mInterfaces)
|
||||||
{
|
{
|
||||||
auto ifaceInst = ifaceTypeInst.mInterfaceType;
|
auto ifaceInst = ifaceTypeInst.mInterfaceType;
|
||||||
int startIdx = ifaceTypeInst.mStartInterfaceTableIdx;
|
int startIdx = ifaceTypeInst.mStartInterfaceTableIdx;
|
||||||
|
@ -4961,17 +4970,20 @@ void BfCompiler::PopulateReified()
|
||||||
if ((ifaceMethodInst == NULL) || (!ifaceMethodInst->IsReifiedAndImplemented()))
|
if ((ifaceMethodInst == NULL) || (!ifaceMethodInst->IsReifiedAndImplemented()))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
auto implMethodRef = &typeInst->mInterfaceMethodTable[iMethodIdx + startIdx].mMethodRef;
|
auto implMethodRef = &checkType->mInterfaceMethodTable[iMethodIdx + startIdx].mMethodRef;
|
||||||
BfMethodInstance* implMethod = *implMethodRef;
|
BfMethodInstance* implMethod = *implMethodRef;
|
||||||
if (implMethod == NULL)
|
if (implMethod == NULL)
|
||||||
continue;
|
continue;
|
||||||
if (!implMethod->IsReifiedAndImplemented())
|
if (!implMethod->IsReifiedAndImplemented())
|
||||||
{
|
{
|
||||||
didWork = true;
|
didWork = true;
|
||||||
typeInst->mModule->GetMethodInstance(implMethod);
|
checkType->mModule->GetMethodInstance(implMethod);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
checkType = checkType->mBaseType;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue