From b09364cd34d329ead4e1bf5865a027699059594b Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Wed, 24 Jun 2020 06:23:47 -0700 Subject: [PATCH] Fixed typeState issue with exterior nodes --- IDEHelper/Compiler/BfCompiler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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))