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

Fixed reification of internal method overrides in uninstantiated types

This commit is contained in:
Brian Fiete 2020-10-25 11:08:42 -07:00
parent 2c41b5c3f7
commit 5cf3055750

View file

@ -5314,7 +5314,7 @@ void BfCompiler::PopulateReified()
// Check reifications forced by virtuals or interfaces // Check reifications forced by virtuals or interfaces
if ((!mIsResolveOnly) && (typeInst != NULL) && (typeInst->mIsReified) && (!typeInst->IsUnspecializedType()) && (!typeInst->IsInterface()) && if ((!mIsResolveOnly) && (typeInst != NULL) && (typeInst->mIsReified) && (!typeInst->IsUnspecializedType()) && (!typeInst->IsInterface()) &&
(typeInst->mHasBeenInstantiated) && (!typeInst->IsIncomplete())) (!typeInst->IsIncomplete()))
{ {
// If we have chained methods, make sure we implement the chain members if the chain head is implemented and reified // If we have chained methods, make sure we implement the chain members if the chain head is implemented and reified
if (typeInst->mTypeDef->mIsCombinedPartial) if (typeInst->mTypeDef->mIsCombinedPartial)
@ -5412,6 +5412,9 @@ void BfCompiler::PopulateReified()
} }
} }
// Only check virtual stuff if we have been instantiated
if (typeInst->mHasBeenInstantiated)
{
// If we have any virtual methods overrides that are unreified but the declaring virtual method is reified then we also need to reify // If we have any virtual methods overrides that are unreified but the declaring virtual method is reified then we also need to reify
for (auto&& vEntry : typeInst->mVirtualMethodTable) for (auto&& vEntry : typeInst->mVirtualMethodTable)
{ {
@ -5495,6 +5498,7 @@ void BfCompiler::PopulateReified()
} }
} }
} }
}
BfLogSysM("PopulateReified iteration done\n"); BfLogSysM("PopulateReified iteration done\n");