Skip to content

Commit 59d4e25

Browse files
committed
Fixed prop binding issue with direct-autoprop optimization interference
1 parent a5e0a56 commit 59d4e25

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

IDEHelper/Compiler/BfExprEvaluator.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4635,6 +4635,8 @@ BfTypedValue BfExprEvaluator::LookupField(BfAstNode* targetSrc, BfTypedValue tar
46354635

46364636
bool doAccessCheck = true;
46374637

4638+
if ((flags & BfLookupFieldFlag_BindOnly) != 0)
4639+
doAccessCheck = false;
46384640
if ((mModule->mAttributeState != NULL) && (mModule->mAttributeState->mCustomAttributes != NULL) && (mModule->mAttributeState->mCustomAttributes->Contains(mModule->mCompiler->mDisableObjectAccessChecksAttributeTypeDef)))
46394641
doAccessCheck = false;
46404642

@@ -4861,7 +4863,7 @@ BfTypedValue BfExprEvaluator::LookupField(BfAstNode* targetSrc, BfTypedValue tar
48614863
}
48624864

48634865
// Check for direct auto-property access
4864-
if (startCheckType == mModule->mCurTypeInstance)
4866+
if ((startCheckType == mModule->mCurTypeInstance) && ((flags & BfLookupFieldFlag_BindOnly) == 0))
48654867
{
48664868
if (auto propertyDeclaration = BfNodeDynCast<BfPropertyDeclaration>(mPropDef->mFieldDeclaration))
48674869
{

0 commit comments

Comments
 (0)