mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 03:28:20 +02:00
declMethodInstance null check
This commit is contained in:
parent
96436ad825
commit
27ee2a10ac
1 changed files with 12 additions and 9 deletions
|
@ -6555,16 +6555,19 @@ BfIRValue BfModule::CreateTypeData(BfType* type, BfCreateTypeDataContext& ctx, b
|
|||
origVTable = typeInstance->mVirtualMethodTable;
|
||||
|
||||
BfMethodInstance* declMethodInstance = entry.mDeclaringMethod;
|
||||
if ((mIsComptimeModule) || (typeInstance->IsTypeMemberAccessible(declMethodInstance->mMethodDef->mDeclaringType, mProject)))
|
||||
if (declMethodInstance != NULL)
|
||||
{
|
||||
// Prepare to reslot...
|
||||
entry.mImplementingMethod = entry.mDeclaringMethod;
|
||||
reslotNames.Add(declMethodInstance->mMethodDef->mName);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Decl isn't accessible, null out entry
|
||||
entry.mImplementingMethod = BfMethodRef();
|
||||
if ((mIsComptimeModule) || (typeInstance->IsTypeMemberAccessible(declMethodInstance->mMethodDef->mDeclaringType, mProject)))
|
||||
{
|
||||
// Prepare to reslot...
|
||||
entry.mImplementingMethod = entry.mDeclaringMethod;
|
||||
reslotNames.Add(declMethodInstance->mMethodDef->mName);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Decl isn't accessible, null out entry
|
||||
entry.mImplementingMethod = BfMethodRef();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue