1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 04:22:20 +02:00

Support for top-level internal protection, autocomplete internal fixes

This commit is contained in:
Brian Fiete 2021-11-23 14:25:07 -08:00
parent 0592701576
commit 870c9914be
4 changed files with 23 additions and 10 deletions

View file

@ -1449,7 +1449,9 @@ void BfDefBuilder::Visit(BfTypeDeclaration* typeDeclaration)
mCurTypeDef->mProtection = (outerTypeDef == NULL) ? BfProtection_Public : BfProtection_Private;
if (typeDeclaration->mProtectionSpecifier != NULL)
{
if ((outerTypeDef == NULL) && (typeDeclaration->mProtectionSpecifier->GetToken() != BfToken_Public))
if ((outerTypeDef == NULL) &&
(typeDeclaration->mProtectionSpecifier->GetToken() != BfToken_Public) &&
(typeDeclaration->mProtectionSpecifier->GetToken() != BfToken_Internal))
{
//CS1527
Fail("Elements defined in a namespace cannot be explicitly declared as private or protected", typeDeclaration->mProtectionSpecifier);