1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 04:22:20 +02:00

Fixed autocomplete issues with nested calls

This commit is contained in:
Brian Fiete 2019-11-02 06:04:26 -07:00
parent e1656865bb
commit f10551e6f8
5 changed files with 70 additions and 41 deletions

View file

@ -1794,18 +1794,9 @@ void BfAutoComplete::CheckInvocation(BfAstNode* invocationNode, BfTokenNode* ope
if (doCapture)
{
mIsCapturingMethodMatchInfo = true;
if (mMethodMatchInfo == NULL)
mMethodMatchInfo = new MethodMatchInfo();
else
{
if (wasCapturingMethodMatchInfo)
{
// We're actually in an inner invocation now
delete mMethodMatchInfo;
mMethodMatchInfo = new MethodMatchInfo();
mMethodMatchInfo->mSrcPositions.Clear();
}
}
delete mMethodMatchInfo;
mMethodMatchInfo = new MethodMatchInfo();
mMethodMatchInfo->mInvocationSrcIdx = target->GetSrcStart();
mMethodMatchInfo->mCurMethodInstance = mModule->mCurMethodInstance;