1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-09 03:52:19 +02:00

Allow warn/error attribute on fields

This commit is contained in:
Brian Fiete 2022-08-27 09:23:31 -07:00
parent db73305d2c
commit f8f95e9de3
4 changed files with 52 additions and 17 deletions

View file

@ -9803,7 +9803,7 @@ BfType* BfModule::ResolveTypeResult(BfTypeReference* typeRef, BfType* resolvedTy
if (resolvedTypeRef->mDefineState == BfTypeDefineState_Undefined)
PopulateType(resolvedTypeRef);
if ((typeInstance->mCustomAttributes != NULL) && (!typeRef->IsTemporary()))
CheckErrorAttributes(typeInstance, NULL, typeInstance->mCustomAttributes, typeRef);
CheckErrorAttributes(typeInstance, NULL, NULL, typeInstance->mCustomAttributes, typeRef);
resolvedTypeRef = resolvedTypeRef->GetUnderlyingType();
if (resolvedTypeRef != NULL)
typeInstance = resolvedTypeRef->ToTypeInstance();
@ -9817,7 +9817,7 @@ BfType* BfModule::ResolveTypeResult(BfTypeReference* typeRef, BfType* resolvedTy
if ((!typeRef->IsTemporary()) && ((resolveFlags & BfResolveTypeRefFlag_FromIndirectSource) == 0))
{
if (typeInstance->mCustomAttributes != NULL)
CheckErrorAttributes(typeInstance, NULL, typeInstance->mCustomAttributes, typeRef);
CheckErrorAttributes(typeInstance, NULL, NULL, typeInstance->mCustomAttributes, typeRef);
else if ((typeInstance->mTypeDef->mTypeDeclaration != NULL) && (typeInstance->mTypeDef->mTypeDeclaration->mAttributes != NULL))
{
auto typeRefVerifyRequest = mContext->mTypeRefVerifyWorkList.Alloc();
@ -15827,4 +15827,6 @@ void BfModule::DoTypeToString(StringImpl& str, BfType* resolvedType, BfTypeNameF
BFMODULE_FATAL(this, "Not implemented");
str += "???";
return;
}
}