1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-09 03:52:19 +02:00

PopulateType fixes with nested generic type references

This commit is contained in:
Brian Fiete 2022-02-23 07:35:21 -08:00
parent f8d6f1405a
commit 35584ef288
2 changed files with 23 additions and 0 deletions

View file

@ -10917,6 +10917,8 @@ BfType* BfModule::ResolveTypeRef(BfTypeReference* typeRef, BfPopulateType popula
auto parentTypeInstance = outerTypeInstance;
if ((parentTypeInstance != NULL) && (parentTypeInstance->IsTypeAlias()))
parentTypeInstance = (BfTypeInstance*)GetOuterType(parentTypeInstance)->ToTypeInstance();
if (parentTypeInstance->mDefineState < BfTypeDefineState_Declared)
PopulateType(parentTypeInstance, BfPopulateType_Declaration);
if ((parentTypeInstance != NULL) && (parentTypeInstance->IsGenericTypeInstance()))
{
genericTypeInst->mGenericTypeInfo->mMaxGenericDepth = BF_MAX(genericTypeInst->mGenericTypeInfo->mMaxGenericDepth, parentTypeInstance->mGenericTypeInfo->mMaxGenericDepth);