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:
parent
a5e0a5688b
commit
59d4e258d5
1 changed files with 3 additions and 1 deletions
|
@ -4635,6 +4635,8 @@ BfTypedValue BfExprEvaluator::LookupField(BfAstNode* targetSrc, BfTypedValue tar
|
||||||
|
|
||||||
bool doAccessCheck = true;
|
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)))
|
if ((mModule->mAttributeState != NULL) && (mModule->mAttributeState->mCustomAttributes != NULL) && (mModule->mAttributeState->mCustomAttributes->Contains(mModule->mCompiler->mDisableObjectAccessChecksAttributeTypeDef)))
|
||||||
doAccessCheck = false;
|
doAccessCheck = false;
|
||||||
|
|
||||||
|
@ -4861,7 +4863,7 @@ BfTypedValue BfExprEvaluator::LookupField(BfAstNode* targetSrc, BfTypedValue tar
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check for direct auto-property access
|
// 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))
|
if (auto propertyDeclaration = BfNodeDynCast<BfPropertyDeclaration>(mPropDef->mFieldDeclaration))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue