1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 04:22:20 +02:00

Fixed unspecialized variation assert

This commit is contained in:
Brian Fiete 2022-03-17 11:27:06 -07:00
parent 086c7952a4
commit a64e595416

View file

@ -3149,7 +3149,7 @@ BfType* BfExprEvaluator::BindGenericType(BfAstNode* node, BfType* bindType)
if ((mBfEvalExprFlags & BfEvalExprFlags_DeclType) != 0) if ((mBfEvalExprFlags & BfEvalExprFlags_DeclType) != 0)
return bindType; return bindType;
BF_ASSERT(!mModule->mCurMethodInstance->mIsUnspecializedVariation); BF_ASSERT((!mModule->mCurMethodInstance->mIsUnspecializedVariation) || (mModule->mIsComptimeModule));
auto parser = node->GetSourceData()->ToParserData(); auto parser = node->GetSourceData()->ToParserData();
if (parser == NULL) if (parser == NULL)
@ -3158,7 +3158,7 @@ BfType* BfExprEvaluator::BindGenericType(BfAstNode* node, BfType* bindType)
auto genericTypeBindings = mModule->mCurMethodState->GetRootMethodState()->mGenericTypeBindings; auto genericTypeBindings = mModule->mCurMethodState->GetRootMethodState()->mGenericTypeBindings;
if (mModule->mCurMethodInstance->mIsUnspecialized) if ((mModule->mCurMethodInstance->mIsUnspecialized) && (!mModule->mCurMethodInstance->mIsUnspecializedVariation))
{ {
if (!bindType->IsGenericParam()) if (!bindType->IsGenericParam())
return bindType; return bindType;