mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 20:12:21 +02:00
Fixed resolve-only property devirtualize check
This commit is contained in:
parent
156d8413ed
commit
e865e675a7
1 changed files with 9 additions and 4 deletions
|
@ -14638,13 +14638,18 @@ BfModuleMethodInstance BfExprEvaluator::GetPropertyMethodInstance(BfMethodDef* m
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
auto propTypeInst = mPropTarget.mType->ToTypeInstance();
|
auto propTypeInst = mPropTarget.mType->ToTypeInstance();
|
||||||
|
mModule->PopulateType(propTypeInst, BfPopulateType_DataAndMethods);
|
||||||
auto rawMethodInstance = mModule->GetRawMethodInstance(propTypeInst, methodDef);
|
auto rawMethodInstance = mModule->GetRawMethodInstance(propTypeInst, methodDef);
|
||||||
|
|
||||||
BF_ASSERT(rawMethodInstance->mVirtualTableIdx != -1);
|
|
||||||
if (rawMethodInstance->mVirtualTableIdx == -1)
|
if (rawMethodInstance->mVirtualTableIdx == -1)
|
||||||
{
|
{
|
||||||
|
if (!mModule->mCompiler->mIsResolveOnly)
|
||||||
|
{
|
||||||
|
// ResolveOnly does not force methods to slot
|
||||||
|
BF_ASSERT(rawMethodInstance->mVirtualTableIdx != -1);
|
||||||
mModule->Fail(StrFormat("Failed to devirtualize %s", mModule->MethodToString(rawMethodInstance).c_str()));
|
mModule->Fail(StrFormat("Failed to devirtualize %s", mModule->MethodToString(rawMethodInstance).c_str()));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
auto useTypeInst = mOrigPropTarget.mType->ToTypeInstance();
|
auto useTypeInst = mOrigPropTarget.mType->ToTypeInstance();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue