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

Allow method attributes on properties with expression bodies

This commit is contained in:
Brian Fiete 2020-08-29 11:28:11 -07:00
parent 4369e07a55
commit 535045c48a
6 changed files with 39 additions and 19 deletions

View file

@ -4149,7 +4149,10 @@ void BfCompiler::ProcessAutocompleteTempType()
{
if ((propDef->mFieldDeclaration != NULL) && (propDef->mFieldDeclaration->mAttributes != NULL))
{
auto customAttrs = module->GetCustomAttributes(propDef->mFieldDeclaration->mAttributes, BfAttributeTargets_Property);
BfAttributeTargets target = BfAttributeTargets_Property;
if (propDef->IsExpressionBodied())
target = (BfAttributeTargets)(target | BfAttributeTargets_Method);
auto customAttrs = module->GetCustomAttributes(propDef->mFieldDeclaration->mAttributes, target);
delete customAttrs;
}