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

Fixed unbound generic typedef lookup

This commit is contained in:
Brian Fiete 2022-06-22 12:27:31 -07:00
parent 36a8c2c6ae
commit 7d1e863d96

View file

@ -10742,7 +10742,7 @@ BfType* BfModule::ResolveTypeRef(BfTypeReference* typeRef, BfPopulateType popula
if (!findName.IsEmpty()) if (!findName.IsEmpty())
{ {
int wantNumGenericArgs = 0; int wantNumGenericArgs = numGenericArgs;
#ifdef BF_AST_HAS_PARENT_MEMBER #ifdef BF_AST_HAS_PARENT_MEMBER
if (auto genericTypeParent = BfNodeDynCast<BfGenericInstanceTypeRef>(typeRef->mParent)) if (auto genericTypeParent = BfNodeDynCast<BfGenericInstanceTypeRef>(typeRef->mParent))
{ {
@ -10756,7 +10756,7 @@ BfType* BfModule::ResolveTypeRef(BfTypeReference* typeRef, BfPopulateType popula
{ {
if (auto genericTypeParent = BfNodeDynCast<BfGenericInstanceTypeRef>(mParentNodeEntry->mNode)) if (auto genericTypeParent = BfNodeDynCast<BfGenericInstanceTypeRef>(mParentNodeEntry->mNode))
{ {
wantNumGenericArgs = (int)genericTypeParent->mGenericArguments.size(); wantNumGenericArgs += (int)genericTypeParent->mGenericArguments.size();
genericTypeRef = genericTypeParent; genericTypeRef = genericTypeParent;
} }
} }