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

Fixed parent generic info referencing

This commit is contained in:
Brian Fiete 2021-01-20 09:29:27 -08:00
parent 6c3b2d9eea
commit 92d14df5bd

View file

@ -10050,7 +10050,10 @@ BfType* BfModule::ResolveTypeRef(BfTypeReference* typeRef, BfPopulateType popula
auto parentTypeInstance = (BfTypeInstance*)mCurTypeInstance;
for (int i = 0; i < parentTypeInstance->mGenericTypeInfo->mGenericParams.size(); i++)
{
genericTypeInst->mGenericTypeInfo->mGenericParams.push_back(parentTypeInstance->mGenericTypeInfo->mGenericParams[i]->AddRef());
genericTypeInst->mGenericTypeInfo->mGenericParams.push_back(parentTypeInstance->mGenericTypeInfo->mGenericParams[i]->AddRef());
}
for (int i = 0; i < parentTypeInstance->mGenericTypeInfo->mTypeGenericArguments.size(); i++)
{
genericTypeInst->mGenericTypeInfo->mTypeGenericArguments.push_back(parentTypeInstance->mGenericTypeInfo->mTypeGenericArguments[i]);
auto typeGenericArg = genericTypeInst->mGenericTypeInfo->mTypeGenericArguments[i];
genericTypeInst->mGenericTypeInfo->mIsUnspecialized |= typeGenericArg->IsGenericParam() || typeGenericArg->IsUnspecializedType();