diff --git a/IDEHelper/Compiler/BfCompiler.cpp b/IDEHelper/Compiler/BfCompiler.cpp index e1888b39..39dcba7e 100644 --- a/IDEHelper/Compiler/BfCompiler.cpp +++ b/IDEHelper/Compiler/BfCompiler.cpp @@ -3695,11 +3695,11 @@ void BfCompiler::ProcessAutocompleteTempType() SetAndRestoreValue prevMethodState(module->mCurMethodState, NULL); SetAndRestoreValue prevTypeInstance(module->mCurTypeInstance, NULL); SetAndRestoreValue prevMethodInstance(module->mCurMethodInstance, NULL); + SetAndRestoreValue prevTypeState(module->mContext->mCurTypeState, NULL); // >>> VisitExteriorIdentifiers mResolvePassData->mAutoComplete->SetModule(module); { - SetAndRestoreValue prevTypeState(module->mContext->mCurTypeState, NULL); BP_ZONE("VisitExteriorIdentifiers"); VisitAutocompleteExteriorIdentifiers(); } @@ -3738,7 +3738,7 @@ void BfCompiler::ProcessAutocompleteTempType() BfTypeState typeState; typeState.mCurTypeDef = tempTypeDef; - SetAndRestoreValue prevTypeState(module->mContext->mCurTypeState, &typeState); + module->mContext->mCurTypeState = &typeState; BfStaticSearch* staticSearch = NULL; if (mResolvePassData->mStaticSearchMap.TryAdd(tempTypeDef, NULL, &staticSearch))