diff --git a/IDEHelper/Compiler/BfExprEvaluator.cpp b/IDEHelper/Compiler/BfExprEvaluator.cpp index 3464a78d..9acc56bd 100644 --- a/IDEHelper/Compiler/BfExprEvaluator.cpp +++ b/IDEHelper/Compiler/BfExprEvaluator.cpp @@ -3148,7 +3148,7 @@ BfTypedValue BfExprEvaluator::LookupIdentifier(BfAstNode* refNode, const StringI } if (!thisValue.HasType()) - thisValue = BfTypedValue(mModule->mCurTypeInstance); + thisValue = BfTypedValue(mModule->mCurTypeInstance); BfTypedValue result = LookupField(identifierNode, thisValue, findName, BfLookupFieldFlag_IsImplicitThis); if (mPropDef != NULL) { diff --git a/IDEHelper/Compiler/BfModule.cpp b/IDEHelper/Compiler/BfModule.cpp index 38c56291..dff826d0 100644 --- a/IDEHelper/Compiler/BfModule.cpp +++ b/IDEHelper/Compiler/BfModule.cpp @@ -18788,6 +18788,8 @@ void BfModule::GetMethodCustomAttributes(BfMethodInstance* methodInstance) auto propertyMethodDeclaration = methodDef->GetPropertyMethodDeclaration(); auto typeInstance = methodInstance->GetOwner(); + BfTypeState typeState(typeInstance); + SetAndRestoreValue prevTypeState(mContext->mCurTypeState, &typeState); SetAndRestoreValue prevTypeInstance(mCurTypeInstance, typeInstance); SetAndRestoreValue prevMethodInstance(mCurMethodInstance, methodInstance);