mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 11:38: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
|
||||
{
|
||||
auto propTypeInst = mPropTarget.mType->ToTypeInstance();
|
||||
mModule->PopulateType(propTypeInst, BfPopulateType_DataAndMethods);
|
||||
auto rawMethodInstance = mModule->GetRawMethodInstance(propTypeInst, methodDef);
|
||||
|
||||
BF_ASSERT(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()));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
auto useTypeInst = mOrigPropTarget.mType->ToTypeInstance();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue