mirror of
https://github.com/dlang-community/DCD.git
synced 2025-04-28 14:19:55 +03:00
Fix crash
This commit is contained in:
parent
b46842d637
commit
10374061ea
3 changed files with 21 additions and 1 deletions
|
@ -804,7 +804,12 @@ DSymbol*[] getSymbolsByTokenChain(T)(Scope* completionScope,
|
||||||
if (symbols.length == 0 || symbols[0].type is null || symbols[0].type is symbols[0])
|
if (symbols.length == 0 || symbols[0].type is null || symbols[0].type is symbols[0])
|
||||||
return [];
|
return [];
|
||||||
else if (symbols[0].type.kind == CompletionKind.functionName)
|
else if (symbols[0].type.kind == CompletionKind.functionName)
|
||||||
symbols = [symbols[0].type.type];
|
{
|
||||||
|
if (symbols[0].type.type is null)
|
||||||
|
symbols = [];
|
||||||
|
else
|
||||||
|
symbols = [symbols[0].type.type];
|
||||||
|
}
|
||||||
else
|
else
|
||||||
symbols = [symbols[0].type];
|
symbols = [symbols[0].type];
|
||||||
}
|
}
|
||||||
|
|
11
tests/tc040/file.d
Normal file
11
tests/tc040/file.d
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
T[] dbGet(T)(string sql)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
foreach (res; dbGet!int("select * from table"))
|
||||||
|
{
|
||||||
|
aa[res.];
|
||||||
|
}
|
||||||
|
}
|
4
tests/tc040/run.sh
Executable file
4
tests/tc040/run.sh
Executable file
|
@ -0,0 +1,4 @@
|
||||||
|
set -e
|
||||||
|
set -u
|
||||||
|
|
||||||
|
../../bin/dcd-client $1 file.d -c105
|
Loading…
Add table
Add a link
Reference in a new issue