bug fix #465
This commit is contained in:
parent
f84a05d68f
commit
092c30b60f
|
|
@ -1707,7 +1707,40 @@ namespace CodeCompletion
|
|||
public override void visit(ident_with_templateparams node)
|
||||
{
|
||||
node.name.visit(this);
|
||||
if (this.returned_scope != null)
|
||||
if (returned_scopes.Count > 0 && returned_scopes[0] is ProcScope)
|
||||
{
|
||||
ProcScope ps = returned_scopes[0] as ProcScope;
|
||||
List<TypeScope> template_params = new List<TypeScope>();
|
||||
foreach (type_definition td in node.template_params.params_list)
|
||||
{
|
||||
td.visit(this);
|
||||
if (returned_scope is TypeScope)
|
||||
template_params.Add(returned_scope as TypeScope);
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
returned_scopes[0] = ps.GetInstance(template_params);
|
||||
}
|
||||
else if (returned_scope is ProcScope)
|
||||
{
|
||||
ProcScope ps = returned_scope as ProcScope;
|
||||
List<TypeScope> template_params = new List<TypeScope>();
|
||||
foreach (type_definition td in node.template_params.params_list)
|
||||
{
|
||||
td.visit(this);
|
||||
if (returned_scope is TypeScope)
|
||||
template_params.Add(returned_scope as TypeScope);
|
||||
else
|
||||
{
|
||||
returned_scope = ps;
|
||||
return;
|
||||
}
|
||||
}
|
||||
returned_scope = ps.GetInstance(template_params);
|
||||
}
|
||||
/*else if (this.returned_scope != null)
|
||||
{
|
||||
if (this.returned_scope is TypeScope)
|
||||
{
|
||||
|
|
@ -1721,7 +1754,7 @@ namespace CodeCompletion
|
|||
}
|
||||
returned_scope = ts.GetInstance(instances);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
public override void visit(bracket_expr _bracket_expr)
|
||||
|
|
|
|||
7
TestSuite/intellisense_tests/extensionmethods3.pas
Normal file
7
TestSuite/intellisense_tests/extensionmethods3.pas
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
function f<T>(x: sequence of T): T;
|
||||
begin
|
||||
end;
|
||||
|
||||
begin
|
||||
f&<real>(Arr(1,2,3)).Round{@(расширение) function real.Round(): integer;@}();
|
||||
end.
|
||||
Loading…
Reference in a new issue