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

Fixed field protection in extension

This commit is contained in:
Brian Fiete 2020-10-24 15:44:18 -07:00
parent 20b1ccd672
commit fe3ba6d4d8

View file

@ -1058,9 +1058,7 @@ void BfDefBuilder::Visit(BfFieldDeclaration* fieldDeclaration)
if (fieldDeclaration->mNameNode != NULL) if (fieldDeclaration->mNameNode != NULL)
fieldDef->mName = fieldDeclaration->mNameNode->ToString(); fieldDef->mName = fieldDeclaration->mNameNode->ToString();
fieldDef->mProtection = GetProtection(fieldDeclaration->mProtectionSpecifier); fieldDef->mProtection = GetProtection(fieldDeclaration->mProtectionSpecifier);
if (mCurTypeDef->mIsPartial) if (isEnumEntryDecl)
fieldDef->mProtection = BfProtection_Public;
else if (isEnumEntryDecl)
fieldDef->mProtection = BfProtection_Public; fieldDef->mProtection = BfProtection_Public;
fieldDef->mIsReadOnly = fieldDeclaration->mReadOnlySpecifier != NULL; fieldDef->mIsReadOnly = fieldDeclaration->mReadOnlySpecifier != NULL;
fieldDef->mIsInline = (fieldDeclaration->mReadOnlySpecifier != NULL) && (fieldDeclaration->mReadOnlySpecifier->GetToken() == BfToken_Inline); fieldDef->mIsInline = (fieldDeclaration->mReadOnlySpecifier != NULL) && (fieldDeclaration->mReadOnlySpecifier->GetToken() == BfToken_Inline);