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

Disable autoprop for indexer

This commit is contained in:
Brian Fiete 2025-01-04 12:26:21 -08:00
parent b922c486ec
commit 34cfe603e6
2 changed files with 5 additions and 5 deletions

View file

@ -956,6 +956,8 @@ bool BfTypeDef::HasAutoProperty(BfPropertyDeclaration* propertyDeclaration)
return false;
if (propertyDeclaration->mExternSpecifier != NULL)
return false;
if (propertyDeclaration->IsA<BfIndexerDeclaration>())
return false;
for (auto methodDeclaration : propertyDeclaration->mMethods)
{
@ -967,10 +969,8 @@ bool BfTypeDef::HasAutoProperty(BfPropertyDeclaration* propertyDeclaration)
String BfTypeDef::GetAutoPropertyName(BfPropertyDeclaration* propertyDeclaration)
{
String name = "prop__";
if (propertyDeclaration->IsA<BfIndexerDeclaration>())
name += "indexer__";
else if (propertyDeclaration->mNameNode != NULL)
String name = "prop__";
if (propertyDeclaration->mNameNode != NULL)
name += propertyDeclaration->mNameNode->ToString();
return name;
}