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

Fixed lookup infinite field loop during custom attribute population

This commit is contained in:
Brian Fiete 2021-02-11 07:46:05 -08:00
parent fb0bace727
commit cffd849045
2 changed files with 9 additions and 28 deletions

View file

@ -4248,6 +4248,14 @@ BfTypedValue BfExprEvaluator::LookupField(BfAstNode* targetSrc, BfTypedValue tar
mModule->PopulateType(startCheckType, BfPopulateType_BaseType);
}
if ((startCheckType != NULL) && (mModule->mContext->mCurTypeState != NULL))
{
// Don't allow lookups yet
if ((mModule->mContext->mCurTypeState->mResolveKind == BfTypeState::ResolveKind_Attributes) &&
(startCheckType == mModule->mContext->mCurTypeState->mTypeInstance))
return BfTypedValue();
}
String findName;
int varSkipCount = 0;
if (fieldName.StartsWith('@'))