1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 19:48:20 +02:00

CheckGenericCtor fixes

This commit is contained in:
Brian Fiete 2025-01-29 10:09:52 -08:00
parent 1a1f6f793b
commit da3c5c3c57
2 changed files with 13 additions and 1 deletions

View file

@ -9558,6 +9558,13 @@ BfGenericParamInstance* BfModule::GetGenericTypeParamInstance(int genericParamId
// curTypeInstance = mCurMethodInstance->mMethodInstanceGroup->mOwner;
BfTypeInstance* genericTypeInst = curTypeInstance->ToGenericTypeInstance();
if (genericTypeInst == NULL)
{
FatalError("Invalid mCurTypeInstance for GetGenericTypeParamInstance");
return NULL;
}
if ((genericTypeInst->IsIncomplete()) && (genericTypeInst->mGenericTypeInfo->mGenericParams.size() == 0))
{
// Set this to NULL so we don't recurse infinitely