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

Fixed missing concrete type case in ResolveGenericType

This commit is contained in:
Brian Fiete 2021-01-20 06:34:49 -08:00
parent b3599251ac
commit b283cb0aab
2 changed files with 15 additions and 8 deletions

View file

@ -3910,14 +3910,7 @@ void BfModule::DoPopulateType(BfType* resolvedTypeRef, BfPopulateType populateTy
{
if (!resolvedFieldType->IsValuelessType())
{
if (isCRepr)
{
dataFieldVec.push_back(fieldInstance);
}
else
{
dataFieldVec.push_back(fieldInstance);
}
dataFieldVec.push_back(fieldInstance);
}
}
else
@ -7158,6 +7151,18 @@ BfType* BfModule::ResolveGenericType(BfType* unspecializedType, BfTypeVector* ty
return CreatePointerType(elementType);
}
if (unspecializedType->IsConcreteInterfaceType())
{
auto concreteType = (BfConcreteInterfaceType*)unspecializedType;
auto elementType = ResolveGenericType(concreteType->GetUnderlyingType(), typeGenericArguments, methodGenericArguments, allowFail);
if (elementType == NULL)
return NULL;
auto elementTypeInstance = elementType->ToTypeInstance();
if (elementTypeInstance == NULL)
return unspecializedType;
return CreateConcreteInterfaceType(elementTypeInstance);
}
if (unspecializedType->IsArray())
{
auto arrayType = (BfArrayType*)unspecializedType;