This commit is contained in:
Бондарев Иван 2018-03-25 14:12:38 +02:00
parent 8736edb3df
commit 1936533394
2 changed files with 10 additions and 1 deletions

View file

@ -4597,7 +4597,7 @@ namespace CodeCompletion
public override void visit(ident_with_templateparams node)
{
node.name.visit(this);
if (search_all && returned_scopes.Count > 0 && returned_scopes[0] is ProcScope)
if ((search_all || returned_scope == null) && returned_scopes.Count > 0 && returned_scopes[0] is ProcScope)
{
ProcScope ps = returned_scopes[0] as ProcScope;
List<TypeScope> template_params = new List<TypeScope>();

View file

@ -0,0 +1,9 @@
function f1<T>(a: T) := a;
function f2<T>(): T;begin end;
begin
var a1{var a1: byte;} := f1&<byte>(word(0));
var a2{var a2: byte;} := f2&<byte>();
var a3{var a3: word;} := f1(word(0));
end.