mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 03:52:19 +02:00
Fixed internal access inside generic specializations
This commit is contained in:
parent
d9725dda7c
commit
c8ba4a9e42
2 changed files with 12 additions and 1 deletions
|
@ -3777,6 +3777,12 @@ BfInternalAccessSet* BfModule::GetInternalAccessSet()
|
|||
|
||||
bool BfModule::CheckInternalProtection(BfTypeDef* usingTypeDef)
|
||||
{
|
||||
if ((mCurTypeInstance != NULL) && (mCurTypeInstance->IsSpecializedType()))
|
||||
return true;
|
||||
if ((mCurMethodInstance != NULL) &&
|
||||
((mCurMethodInstance->mIsUnspecializedVariation) || (mCurMethodInstance->IsSpecializedGenericMethod())))
|
||||
return true;
|
||||
|
||||
auto internalAccessSet = GetInternalAccessSet();
|
||||
if (internalAccessSet == NULL)
|
||||
return false;
|
||||
|
@ -22289,8 +22295,13 @@ void BfModule::StartMethodDeclaration(BfMethodInstance* methodInstance, BfMethod
|
|||
if (methodInstance->mIsUnspecializedVariation)
|
||||
BF_ASSERT(methodInstance->mIsUnspecialized);
|
||||
|
||||
//TODO: Why did we do this?
|
||||
if (methodDef->mMethodType == BfMethodType_Mixin)
|
||||
{
|
||||
if (methodInstance->IsSpecializedGenericMethod())
|
||||
methodInstance->mIsUnspecializedVariation = true;
|
||||
methodInstance->mIsUnspecialized = true;
|
||||
}
|
||||
}
|
||||
|
||||
// methodDeclaration is NULL for default constructors
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue