From 2505a6d6eb02da51ea74c587c62ee66f9bf893d3 Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Sun, 22 Sep 2019 09:34:57 -0700 Subject: [PATCH] Fixed autocomplete when previous argument was an indexer --- IDEHelper/Compiler/BfExprEvaluator.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/IDEHelper/Compiler/BfExprEvaluator.cpp b/IDEHelper/Compiler/BfExprEvaluator.cpp index eda3cae2..7b5f9894 100644 --- a/IDEHelper/Compiler/BfExprEvaluator.cpp +++ b/IDEHelper/Compiler/BfExprEvaluator.cpp @@ -15218,15 +15218,17 @@ void BfExprEvaluator::Visit(BfIndexerExpression* indexerExpr) wasCapturingMethodMatchInfo = autoComplete->mIsCapturingMethodMatchInfo; autoComplete->mIsCapturingMethodMatchInfo = false; } + defer + { + if (autoComplete != NULL) + autoComplete->mIsCapturingMethodMatchInfo = wasCapturingMethodMatchInfo; + }; if ((!isFailurePass) && (!methodMatcher.WantsCheckMethod(protectionCheckFlags, startCheckTypeInst, curCheckType, checkMethod))) continue; methodMatcher.mCheckedKind = checkedKind; - methodMatcher.CheckMethod(curCheckType, checkMethod, false); - - if (autoComplete != NULL) - autoComplete->mIsCapturingMethodMatchInfo = wasCapturingMethodMatchInfo; + methodMatcher.CheckMethod(curCheckType, checkMethod, false); if ((methodMatcher.mBestMethodDef == checkMethod) || ((foundProp == NULL) && (methodMatcher.mBackupMethodDef == checkMethod)))