mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 12:02:21 +02:00
Allow method attributes on properties with expression bodies
This commit is contained in:
parent
4369e07a55
commit
535045c48a
6 changed files with 39 additions and 19 deletions
|
@ -2887,15 +2887,13 @@ void BfModule::DoPopulateType(BfType* resolvedTypeRef, BfPopulateType populateTy
|
|||
typeState.mTypeInstance = typeInstance;
|
||||
SetAndRestoreValue<BfTypeState*> prevTypeState(mContext->mCurTypeState, &typeState);
|
||||
|
||||
if (propDef->mFieldDeclaration->mAttributes != NULL)
|
||||
{
|
||||
auto customAttrs = GetCustomAttributes(propDef->mFieldDeclaration->mAttributes, BfAttributeTargets_Property);
|
||||
delete customAttrs;
|
||||
}
|
||||
BfAttributeTargets target = BfAttributeTargets_Property;
|
||||
if (propDef->IsExpressionBodied())
|
||||
target = (BfAttributeTargets)(target | BfAttributeTargets_Method);
|
||||
|
||||
if (propDef->mFieldDeclaration->mAttributes != NULL)
|
||||
{
|
||||
auto customAttrs = GetCustomAttributes(propDef->mFieldDeclaration->mAttributes, BfAttributeTargets_Property);
|
||||
auto customAttrs = GetCustomAttributes(propDef->mFieldDeclaration->mAttributes, target);
|
||||
delete customAttrs;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue