mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 04:22:20 +02:00
Fixed type lookup for attributes on fields when we have extensions
This commit is contained in:
parent
a3f1a33c39
commit
d27707cb6b
1 changed files with 4 additions and 0 deletions
|
@ -2475,6 +2475,10 @@ bool BfModule::DoPopulateType(BfType* resolvedTypeRef, BfPopulateType populateTy
|
||||||
BF_ASSERT(fieldInstance->mCustomAttributes == NULL);
|
BF_ASSERT(fieldInstance->mCustomAttributes == NULL);
|
||||||
if ((fieldDef != NULL) && (fieldDef->mFieldDeclaration != NULL) && (fieldDef->mFieldDeclaration->mAttributes != NULL))
|
if ((fieldDef != NULL) && (fieldDef->mFieldDeclaration != NULL) && (fieldDef->mFieldDeclaration->mAttributes != NULL))
|
||||||
{
|
{
|
||||||
|
BfTypeState typeState;
|
||||||
|
typeState.mCurTypeDef = fieldDef->mDeclaringType;
|
||||||
|
SetAndRestoreValue<BfTypeState*> prevTypeState(mContext->mCurTypeState, &typeState);
|
||||||
|
|
||||||
fieldInstance->mCustomAttributes = GetCustomAttributes(fieldDef->mFieldDeclaration->mAttributes, fieldDef->mIsStatic ? BfAttributeTargets_StaticField : BfAttributeTargets_Field);
|
fieldInstance->mCustomAttributes = GetCustomAttributes(fieldDef->mFieldDeclaration->mAttributes, fieldDef->mIsStatic ? BfAttributeTargets_StaticField : BfAttributeTargets_Field);
|
||||||
|
|
||||||
for (auto customAttr : fieldInstance->mCustomAttributes->mAttributes)
|
for (auto customAttr : fieldInstance->mCustomAttributes->mAttributes)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue