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

Start of anonymous 'using' field

This commit is contained in:
Brian Fiete 2022-02-19 07:38:05 -05:00
parent b886f3d3c3
commit 79e2ff5165
13 changed files with 859 additions and 498 deletions

View file

@ -4657,7 +4657,10 @@ void BfModule::DoPopulateType(BfType* resolvedTypeRef, BfPopulateType populateTy
{
auto resolvedFieldType = fieldInstance->GetResolvedType();
if ((!typeInstance->IsBoxed()) && (fieldDef != NULL))
{
{
if ((fieldDef->mUsingProtection != BfProtection_Hidden) && (!resolvedFieldType->IsStruct()) && (!resolvedFieldType->IsObject()))
Warn(0, StrFormat("Field type '%s' is not applicable for 'using'", TypeToString(resolvedFieldType).c_str()), fieldDef->mFieldDeclaration->mConstSpecifier);
if (fieldInstance->mIsEnumPayloadCase)
{
PopulateType(resolvedFieldType, BfPopulateType_Data);
@ -4911,7 +4914,7 @@ void BfModule::DoPopulateType(BfType* resolvedTypeRef, BfPopulateType populateTy
fieldInstance->mDataIdx = curFieldDataIdx++;
typeInstance->mInstAlign = std::max(typeInstance->mInstAlign, alignSize);
dataPos += dataSize;
dataPos += dataSize;
}
if (unionInnerType != NULL)