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:
parent
b922c486ec
commit
34cfe603e6
2 changed files with 5 additions and 5 deletions
|
@ -22008,7 +22008,7 @@ void BfModule::ProcessMethod(BfMethodInstance* methodInstance, bool isInlineDup,
|
||||||
if ((propertyDeclaration != NULL) && (!typeDef->HasAutoProperty(propertyDeclaration)))
|
if ((propertyDeclaration != NULL) && (!typeDef->HasAutoProperty(propertyDeclaration)))
|
||||||
{
|
{
|
||||||
if ((!mCurTypeInstance->IsInterface()) && (!hasExternSpecifier))
|
if ((!mCurTypeInstance->IsInterface()) && (!hasExternSpecifier))
|
||||||
Fail("Body expected", methodDef->mBody);
|
Fail("Body expected", methodDef->GetRefNode());
|
||||||
}
|
}
|
||||||
else if (methodDef->mMethodType == BfMethodType_PropertyGetter)
|
else if (methodDef->mMethodType == BfMethodType_PropertyGetter)
|
||||||
{
|
{
|
||||||
|
|
|
@ -956,6 +956,8 @@ bool BfTypeDef::HasAutoProperty(BfPropertyDeclaration* propertyDeclaration)
|
||||||
return false;
|
return false;
|
||||||
if (propertyDeclaration->mExternSpecifier != NULL)
|
if (propertyDeclaration->mExternSpecifier != NULL)
|
||||||
return false;
|
return false;
|
||||||
|
if (propertyDeclaration->IsA<BfIndexerDeclaration>())
|
||||||
|
return false;
|
||||||
|
|
||||||
for (auto methodDeclaration : propertyDeclaration->mMethods)
|
for (auto methodDeclaration : propertyDeclaration->mMethods)
|
||||||
{
|
{
|
||||||
|
@ -967,10 +969,8 @@ bool BfTypeDef::HasAutoProperty(BfPropertyDeclaration* propertyDeclaration)
|
||||||
|
|
||||||
String BfTypeDef::GetAutoPropertyName(BfPropertyDeclaration* propertyDeclaration)
|
String BfTypeDef::GetAutoPropertyName(BfPropertyDeclaration* propertyDeclaration)
|
||||||
{
|
{
|
||||||
String name = "prop__";
|
String name = "prop__";
|
||||||
if (propertyDeclaration->IsA<BfIndexerDeclaration>())
|
if (propertyDeclaration->mNameNode != NULL)
|
||||||
name += "indexer__";
|
|
||||||
else if (propertyDeclaration->mNameNode != NULL)
|
|
||||||
name += propertyDeclaration->mNameNode->ToString();
|
name += propertyDeclaration->mNameNode->ToString();
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue