1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 12:32:20 +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

@ -2460,7 +2460,7 @@ void BfMethodMatcher::CheckOuterTypeStaticMethods(BfTypeInstance* typeInstance,
if (checkMethod->mName != mMethodName)
continue;
if ((!isFailurePass) && (!mModule->CheckProtection(checkMethod->mProtection, allowProtected, allowPrivate)))
if ((!isFailurePass) && (!mModule->CheckProtection(checkMethod->mProtection, NULL, allowProtected, allowPrivate)))
continue;
CheckMethod(typeInstance, curTypeInst, checkMethod, isFailurePass);
@ -4059,7 +4059,7 @@ BfTypedValue BfExprEvaluator::LookupField(BfAstNode* targetSrc, BfTypedValue tar
bool isTemporary = target.IsTempAddr();
bool wantsLoadValue = false;
bool wantsReadOnly = false;
if ((field->mIsReadOnly) && ((mModule->mCurMethodInstance->mMethodDef->mMethodType != BfMethodType_Ctor) || (!target.IsThis())))
if ((field->mIsReadOnly) && (mModule->mCurMethodInstance != NULL) && ((mModule->mCurMethodInstance->mMethodDef->mMethodType != BfMethodType_Ctor) || (!target.IsThis())))
wantsReadOnly = true;
bool isComposite = target.mType->IsComposite();