Răsfoiți Sursa

Fixed autocomplete when previous argument was an indexer

Brian Fiete 6 ani în urmă
părinte
comite
2505a6d6eb
1 a modificat fișierele cu 6 adăugiri și 4 ștergeri
  1. 6 4
      IDEHelper/Compiler/BfExprEvaluator.cpp

+ 6 - 4
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)))