1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 04:22:20 +02:00

Added field dtor support for auto-properties

This commit is contained in:
Brian Fiete 2021-06-22 10:42:04 -07:00
parent 90a51834bc
commit f831d75de2
2 changed files with 16 additions and 0 deletions

View file

@ -963,6 +963,13 @@ void BfDefBuilder::Visit(BfPropertyDeclaration* propertyDeclaration)
mCurTypeDef->mSignatureHash = HashString(fieldDef->mName, mCurTypeDef->mSignatureHash);
}
else
{
if (mCurTypeDef->mTypeCode == BfTypeCode_Interface)
Fail("Interface properties cannot have field destructors", propertyDeclaration->mFieldDtor);
else if (propertyDeclaration->mFieldDtor != NULL)
Fail("Properties with method bodies cannot have field destructors", propertyDeclaration->mFieldDtor);
}
for (auto methodDeclaration : propertyDeclaration->mMethods)
{