1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-24 18:48:01 +02:00

Internal protection, 'using internal <type or namespace>;`

This commit is contained in:
Brian Fiete 2020-10-14 11:33:41 -07:00
parent 7349cdf50f
commit 6b27f0f0b2
25 changed files with 313 additions and 96 deletions

View file

@ -3923,7 +3923,7 @@ void BfModule::Visit(BfDeleteStatement* deleteStmt)
auto checkTypeDef = checkTypeInst->mTypeDef;
if (checkTypeDef->mDtorDef != NULL)
{
if (!CheckProtection(checkTypeDef->mDtorDef->mProtection, allowProtected, allowPrivate))
if (!CheckProtection(checkTypeDef->mDtorDef->mProtection, checkTypeInst->mTypeDef, allowProtected, allowPrivate))
{
auto error = Fail(StrFormat("'%s.~this()' is inaccessible due to its protection level", TypeToString(checkTypeInst).c_str()), deleteStmt->mExpression); // CS0122
}