From b316b1412c4f3db917e0f9759d51236ef34df0a6 Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Fri, 22 Oct 2021 12:39:38 -0700 Subject: [PATCH] Fixed invalid restoration of mIsCapturingMethodMatchInfo after cancel --- IDEHelper/Compiler/BfExprEvaluator.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/IDEHelper/Compiler/BfExprEvaluator.cpp b/IDEHelper/Compiler/BfExprEvaluator.cpp index 493ae4b3..5b2c4aea 100644 --- a/IDEHelper/Compiler/BfExprEvaluator.cpp +++ b/IDEHelper/Compiler/BfExprEvaluator.cpp @@ -12310,7 +12310,7 @@ BfLambdaInstance* BfExprEvaluator::GetLambdaInstance(BfLambdaBindExpression* lam ( { if (autoComplete != NULL) - autoComplete->mIsCapturingMethodMatchInfo = (wasCapturingMethodInfo) && (!autoComplete->mIsCapturingMethodMatchInfo); + autoComplete->mIsCapturingMethodMatchInfo = (wasCapturingMethodInfo) && (!autoComplete->mIsCapturingMethodMatchInfo) && (autoComplete->mMethodMatchInfo != NULL); } ); @@ -15220,7 +15220,12 @@ void BfExprEvaluator::InjectMixin(BfAstNode* targetSrc, BfTypedValue target, boo } auto autoComplete = GetAutoComplete(); - if ((autoComplete != NULL) && (autoComplete->mIsCapturingMethodMatchInfo) && (autoComplete->mMethodMatchInfo->mInstanceList.size() != 0)) + if ((autoComplete != NULL) && (autoComplete->mIsCapturingMethodMatchInfo) && (autoComplete->mMethodMatchInfo == NULL)) + { + NOP; + } + + if ((autoComplete != NULL) && (autoComplete->mIsCapturingMethodMatchInfo) && (autoComplete->mMethodMatchInfo != NULL) && (autoComplete->mMethodMatchInfo->mInstanceList.size() != 0)) autoComplete->mIsCapturingMethodMatchInfo = false; BfMethodMatcher methodMatcher(targetSrc, mModule, name, args, methodGenericArgs);