adding null check for firstSymbol
This commit is contained in:
parent
6c3a4d3797
commit
4fd12cf485
|
@ -173,6 +173,10 @@ bool doUFCSSearch(string beforeToken, string lastToken)
|
|||
void getUFCSParenCompletion(ref DSymbol*[] symbols, Scope* completionScope, istring firstToken, istring nextToken, size_t cursorPosition)
|
||||
{
|
||||
DSymbol* firstSymbol = completionScope.getFirstSymbolByNameAndCursor(firstToken, cursorPosition);
|
||||
|
||||
if (firstSymbol is null)
|
||||
return;
|
||||
|
||||
DSymbol*[] possibleUFCSSymbol = completionScope.getSymbolsByNameAndCursor(nextToken, cursorPosition);
|
||||
foreach(nextSymbol; possibleUFCSSymbol){
|
||||
if (nextSymbol && nextSymbol.functionParameters)
|
||||
|
|
Loading…
Reference in New Issue