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

Improved emitted static field lookup

This commit is contained in:
Brian Fiete 2022-06-28 08:33:30 -07:00
parent a69e1cfe6e
commit 1aca5f6771
3 changed files with 8 additions and 2 deletions

View file

@ -5221,6 +5221,12 @@ void BfModule::DoPopulateType(BfType* resolvedTypeRef, BfPopulateType populateTy
{
if ((fieldTypeInst->mRebuildFlags & BfTypeRebuildFlag_UnderlyingTypeDeferred) != 0)
{
if (populateType < BfPopulateType_Data)
{
// We don't actually need the data - bail out
return;
}
BfAstNode* refNode = fieldDef->mFieldDeclaration;
String failStr;
failStr = StrFormat("Circular data reference detected between '%s' and '%s'", TypeToString(mCurTypeInstance).c_str(), TypeToString(fieldTypeInst).c_str());