mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 12:02:21 +02:00
Fixed dtor lookup
This commit is contained in:
parent
eddbf7a984
commit
9268e3b25d
6 changed files with 73 additions and 37 deletions
|
@ -3934,15 +3934,7 @@ void BfModule::Visit(BfDeleteStatement* deleteStmt)
|
|||
bool allowProtected = allowPrivate || TypeIsSubTypeOf(mCurTypeInstance, checkTypeInst);
|
||||
while (checkTypeInst != NULL)
|
||||
{
|
||||
auto checkTypeDef = checkTypeInst->mTypeDef;
|
||||
|
||||
checkTypeDef->PopulateMemberSets();
|
||||
BfMemberSetEntry* entry = NULL;
|
||||
BfMethodDef* dtorMethodDef = NULL;
|
||||
checkTypeDef->mMethodSet.TryGetWith(String("~this"), &entry);
|
||||
if (entry != NULL)
|
||||
dtorMethodDef = (BfMethodDef*)entry->mMemberDef;
|
||||
|
||||
auto dtorMethodDef = checkTypeInst->mTypeDef->GetMethodByName("~this");
|
||||
if (dtorMethodDef)
|
||||
{
|
||||
if (!CheckProtection(dtorMethodDef->mProtection, checkTypeInst->mTypeDef, allowProtected, allowPrivate))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue