1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 19:48:20 +02:00

AllowDuplicatesAttribute

This commit is contained in:
Brian Fiete 2019-12-25 16:38:17 -08:00
parent 2618b29daa
commit 8808da307f
13 changed files with 39 additions and 2 deletions

View file

@ -2990,7 +2990,7 @@ bool BfModule::DoPopulateType(BfType* resolvedTypeRef, BfPopulateType populateTy
{
*fieldDefPtr = fieldDef;
}
else
else if ((typeInstance->mCustomAttributes == NULL) || (typeInstance->mCustomAttributes->Get(mCompiler->mAllowDuplicatesAttributeTypeDef) == NULL))
{
auto error = Warn(0, StrFormat("Enum value '%lld' for field '%s' is not unique", foreignConst->mInt64, fieldDef->mName.c_str()), fieldDef->GetRefNode(), true);
if (error != NULL)