From e247e3ecb4ae46f96ae4d3de6cceac73b80920b3 Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Thu, 28 Jul 2022 06:52:52 -0400 Subject: [PATCH] Fixed nested local method skipping during resolution --- IDEHelper/Compiler/BfStmtEvaluator.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/IDEHelper/Compiler/BfStmtEvaluator.cpp b/IDEHelper/Compiler/BfStmtEvaluator.cpp index 5521ee5d..595551b0 100644 --- a/IDEHelper/Compiler/BfStmtEvaluator.cpp +++ b/IDEHelper/Compiler/BfStmtEvaluator.cpp @@ -3507,7 +3507,12 @@ void BfModule::VisitCodeBlock(BfBlock* block) BfLocalMethod* localMethod = mCurMethodState->mLocalMethods[curLocalMethodIdx]; BF_ASSERT(localMethod->mMethodDeclaration == localMethodDecl->mMethodDeclaration); - if ((wantsAllLocalMethods) || (autoComplete->IsAutocompleteNode(localMethod->mMethodDeclaration))) + bool wantsLocalMethod = (wantsAllLocalMethods) || (autoComplete->IsAutocompleteNode(localMethod->mMethodDeclaration)); + + if ((!wantsLocalMethod) && (mCurMethodInstance->mMethodDef->mIsLocalMethod)) + wantsLocalMethod = true; + + if (wantsLocalMethod) { if (!mCurMethodInstance->IsSpecializedGenericMethodOrType()) GetLocalMethodInstance(localMethod, BfTypeVector(), NULL, true); // Only necessary on unspecialized pass