2
0
Эх сурвалжийг харах

Fixed autocomplete when previous argument was an indexer

Brian Fiete 6 жил өмнө
parent
commit
2505a6d6eb

+ 6 - 4
IDEHelper/Compiler/BfExprEvaluator.cpp

@@ -15218,15 +15218,17 @@ void BfExprEvaluator::Visit(BfIndexerExpression* indexerExpr)
 							wasCapturingMethodMatchInfo = autoComplete->mIsCapturingMethodMatchInfo;
 							wasCapturingMethodMatchInfo = autoComplete->mIsCapturingMethodMatchInfo;
 							autoComplete->mIsCapturingMethodMatchInfo = false;
 							autoComplete->mIsCapturingMethodMatchInfo = false;
 						}
 						}
+						defer
+						{
+							if (autoComplete != NULL)
+								autoComplete->mIsCapturingMethodMatchInfo = wasCapturingMethodMatchInfo;
+						};
 
 
 						if ((!isFailurePass) && (!methodMatcher.WantsCheckMethod(protectionCheckFlags, startCheckTypeInst, curCheckType, checkMethod)))
 						if ((!isFailurePass) && (!methodMatcher.WantsCheckMethod(protectionCheckFlags, startCheckTypeInst, curCheckType, checkMethod)))
 							continue;
 							continue;
 
 
 						methodMatcher.mCheckedKind = checkedKind;
 						methodMatcher.mCheckedKind = checkedKind;
-						methodMatcher.CheckMethod(curCheckType, checkMethod, false);
-
-						if (autoComplete != NULL)
-							autoComplete->mIsCapturingMethodMatchInfo = wasCapturingMethodMatchInfo;
+						methodMatcher.CheckMethod(curCheckType, checkMethod, false);						
 
 
 						if ((methodMatcher.mBestMethodDef == checkMethod) ||
 						if ((methodMatcher.mBestMethodDef == checkMethod) ||
 							((foundProp == NULL) && (methodMatcher.mBackupMethodDef == checkMethod)))
 							((foundProp == NULL) && (methodMatcher.mBackupMethodDef == checkMethod)))