diff --git a/IDEHelper/Compiler/BfModule.cpp b/IDEHelper/Compiler/BfModule.cpp index 74562973..2570f5ef 100644 --- a/IDEHelper/Compiler/BfModule.cpp +++ b/IDEHelper/Compiler/BfModule.cpp @@ -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 diff --git a/IDEHelper/Compiler/BfModuleTypeUtils.cpp b/IDEHelper/Compiler/BfModuleTypeUtils.cpp index e57976ee..2c08d496 100644 --- a/IDEHelper/Compiler/BfModuleTypeUtils.cpp +++ b/IDEHelper/Compiler/BfModuleTypeUtils.cpp @@ -6570,7 +6570,7 @@ void BfModule::AddMethodToWorkList(BfMethodInstance* methodInstance) BF_ASSERT(mIsModuleMutable || mReifyQueued); } - BF_ASSERT(mBfIRBuilder != NULL); + BF_ASSERT((mBfIRBuilder != NULL) || (!methodInstance->mIsReified)); BfLogSysM("Adding to mMethodWorkList Module: %p IncompleteMethodCount: %d Type %p MethodInstance: %p Name:%s TypeRevision: %d ModuleRevision: %d ReqId:%d\n", this, mIncompleteMethodCount, typeInstance, methodInstance, methodInstance->mMethodDef->mName.c_str(), methodProcessRequest->mRevision, methodProcessRequest->mFromModuleRevision, methodProcessRequest->mReqId);