1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-14 22:34:09 +02:00

Disabled custom attributes when boxed

This commit is contained in:
Brian Fiete 2020-04-02 08:57:00 -07:00
parent 67dadf34e5
commit bb59aa3162

View file

@ -2096,6 +2096,8 @@ bool BfModule::DoPopulateType(BfType* resolvedTypeRef, BfPopulateType populateTy
typeInstance->mInstSize = std::max(0, typeInstance->mInstSize); typeInstance->mInstSize = std::max(0, typeInstance->mInstSize);
typeInstance->mInstAlign = std::max(0, typeInstance->mInstAlign); typeInstance->mInstAlign = std::max(0, typeInstance->mInstAlign);
if (!typeInstance->IsBoxed())
{
if ((typeInstance->mCustomAttributes == NULL) && (typeDef->mTypeDeclaration != NULL) && (typeDef->mTypeDeclaration->mAttributes != NULL)) if ((typeInstance->mCustomAttributes == NULL) && (typeDef->mTypeDeclaration != NULL) && (typeDef->mTypeDeclaration->mAttributes != NULL))
{ {
BfAttributeTargets attrTarget; BfAttributeTargets attrTarget;
@ -2134,6 +2136,7 @@ bool BfModule::DoPopulateType(BfType* resolvedTypeRef, BfPopulateType populateTy
typeInstance->mCustomAttributes = GetCustomAttributes(typeDef->mTypeDeclaration->mAttributes, attrTarget); typeInstance->mCustomAttributes = GetCustomAttributes(typeDef->mTypeDeclaration->mAttributes, attrTarget);
} }
} }
}
if (typeInstance->mTypeOptionsIdx == -2) if (typeInstance->mTypeOptionsIdx == -2)
{ {