diff --git a/IDEHelper/Compiler/BfCompiler.cpp b/IDEHelper/Compiler/BfCompiler.cpp index 1f66735e..b8ecc72f 100644 --- a/IDEHelper/Compiler/BfCompiler.cpp +++ b/IDEHelper/Compiler/BfCompiler.cpp @@ -6883,6 +6883,12 @@ bool BfCompiler::DoCompile(const StringImpl& outputDirectory) continue; if (typeInst->mAlwaysIncludeFlags == BfAlwaysIncludeFlag_None) continue; + if (typeInst->IsGenericTypeInstance()) + { + if ((!typeInst->IsUnspecializedType()) || (typeInst->IsUnspecializedTypeVariation())) + continue; + } + auto requiredModule = typeInst->GetModule(); if (requiredModule != NULL) requiredModules.push_back(requiredModule); @@ -9016,6 +9022,8 @@ BF_EXPORT const char* BF_CALLTYPE BfCompiler_GetUsedOutputFileNames(BfCompiler* for (auto mainModule : moduleList) { + BF_ASSERT(!mainModule->mIsDeleting); + for (auto fileNameIdx : mainModule->mImportFileNames) { auto fileName = bfCompiler->mContext->mStringObjectIdMap[fileNameIdx].mString; diff --git a/IDEHelper/Compiler/BfContext.cpp b/IDEHelper/Compiler/BfContext.cpp index 13ea5a8c..a398ca06 100644 --- a/IDEHelper/Compiler/BfContext.cpp +++ b/IDEHelper/Compiler/BfContext.cpp @@ -2811,6 +2811,8 @@ void BfContext::MarkUsedModules(BfProject* project, BfModule* module) { BP_ZONE("BfContext::MarkUsedModules"); + BF_ASSERT(!module->mIsDeleting); + if (module->mIsScratchModule) return;