Fix #341
This commit is contained in:
parent
f365f7ad7b
commit
05873e1567
|
@ -801,20 +801,12 @@ DSymbol*[] getSymbolsByTokenChain(T)(Scope* completionScope,
|
|||
|
||||
if (shouldSwapWithType(completionType, symbols[0].kind, 0, tokens.length - 1))
|
||||
{
|
||||
if (symbols.length == 0)
|
||||
if (symbols.length == 0 || symbols[0].type is null || symbols[0].type is symbols[0])
|
||||
return [];
|
||||
if (symbols[0].type is null || symbols[0].type is symbols[0])
|
||||
{
|
||||
symbols = [];
|
||||
}
|
||||
else if (symbols[0].type.kind == CompletionKind.functionName)
|
||||
{
|
||||
symbols = [symbols[0].type.type];
|
||||
}
|
||||
else
|
||||
{
|
||||
symbols = [symbols[0].type];
|
||||
}
|
||||
else if (symbols[0].type.kind == CompletionKind.functionName)
|
||||
symbols = [symbols[0].type.type];
|
||||
else
|
||||
symbols = [symbols[0].type];
|
||||
}
|
||||
|
||||
loop: for (size_t i = 1; i < tokens.length; i++)
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
auto genFirstSet(Rule* r)
|
||||
{
|
||||
switch (r.parts[0].)
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
set -e
|
||||
set -u
|
||||
|
||||
../../bin/dcd-client $1 file.d -c48 > actual.txt
|
||||
diff actual.txt expected.txt
|
||||
|
Loading…
Reference in New Issue