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

Fixed GetGenericTypeParamInstance with extensions

This commit is contained in:
Brian Fiete 2022-05-25 15:03:06 -07:00
parent 0c34e62df2
commit da29789bd6
3 changed files with 12 additions and 1 deletions

View file

@ -8891,7 +8891,8 @@ BfGenericParamInstance* BfModule::GetGenericTypeParamInstance(int genericParamId
if (genericTypeInst->mGenericTypeInfo->mGenericExtensionInfo != NULL)
{
auto activeTypeDef = GetActiveTypeDef(NULL, true);
if ((activeTypeDef->mTypeDeclaration != genericTypeInst->mTypeDef->mTypeDeclaration) && (activeTypeDef->IsExtension()))
if ((activeTypeDef->mTypeDeclaration != genericTypeInst->mTypeDef->mTypeDeclaration) && (activeTypeDef->IsExtension()) &&
(genericTypeInst->mTypeDef->ContainsPartial(activeTypeDef)))
{
BfTypeDef* lookupTypeDef = activeTypeDef;
while (lookupTypeDef->mNestDepth > genericTypeInst->mTypeDef->mNestDepth)