mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +02:00
Fixed field dtor error in autoprops
This commit is contained in:
parent
f831d75de2
commit
9ba8bd86b8
1 changed files with 7 additions and 4 deletions
|
@ -965,10 +965,13 @@ void BfDefBuilder::Visit(BfPropertyDeclaration* propertyDeclaration)
|
|||
}
|
||||
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);
|
||||
if (propertyDeclaration->mFieldDtor != NULL)
|
||||
{
|
||||
if (mCurTypeDef->mTypeCode == BfTypeCode_Interface)
|
||||
Fail("Interface properties cannot have field destructors", propertyDeclaration->mFieldDtor);
|
||||
else
|
||||
Fail("Properties with method bodies cannot have field destructors", propertyDeclaration->mFieldDtor);
|
||||
}
|
||||
}
|
||||
|
||||
for (auto methodDeclaration : propertyDeclaration->mMethods)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue