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

Fixed prop binding issue with direct-autoprop optimization interference

This commit is contained in:
Brian Fiete 2021-02-21 06:25:27 -08:00
parent a5e0a5688b
commit 59d4e258d5

View file

@ -4635,6 +4635,8 @@ BfTypedValue BfExprEvaluator::LookupField(BfAstNode* targetSrc, BfTypedValue tar
bool doAccessCheck = true;
if ((flags & BfLookupFieldFlag_BindOnly) != 0)
doAccessCheck = false;
if ((mModule->mAttributeState != NULL) && (mModule->mAttributeState->mCustomAttributes != NULL) && (mModule->mAttributeState->mCustomAttributes->Contains(mModule->mCompiler->mDisableObjectAccessChecksAttributeTypeDef)))
doAccessCheck = false;
@ -4861,7 +4863,7 @@ BfTypedValue BfExprEvaluator::LookupField(BfAstNode* targetSrc, BfTypedValue tar
}
// Check for direct auto-property access
if (startCheckType == mModule->mCurTypeInstance)
if ((startCheckType == mModule->mCurTypeInstance) && ((flags & BfLookupFieldFlag_BindOnly) == 0))
{
if (auto propertyDeclaration = BfNodeDynCast<BfPropertyDeclaration>(mPropDef->mFieldDeclaration))
{