bug fix #685
This commit is contained in:
parent
51ad71de05
commit
e6b0fdfe7f
|
|
@ -2517,8 +2517,9 @@ namespace CodeCompletion
|
|||
}
|
||||
if (returned_scope != null && returned_scope is ProcScope && (returned_scope as ProcScope).return_type != null)
|
||||
{
|
||||
if ((returned_scope as ProcScope).parameters.Count == 0)
|
||||
returned_scope = (returned_scope as ProcScope).return_type;
|
||||
ProcScope ps = returned_scope as ProcScope;
|
||||
if (ps.parameters.Count == 0 || ps.is_extension || ps.parameters[0].param_kind == parametr_kind.params_parametr || ps.parameters[0].cnst_val != null)
|
||||
returned_scope = ps.return_type;
|
||||
return;
|
||||
}
|
||||
else if (returned_scope is ElementScope)
|
||||
|
|
|
|||
19
TestSuite/intellisense_tests/function3.pas
Normal file
19
TestSuite/intellisense_tests/function3.pas
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
type TClass = class
|
||||
function f(params arr: array of char): char;
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
function f2(a:integer:=2): integer;
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
|
||||
begin
|
||||
var a: sequence of byte;
|
||||
var b{@var b: array of byte;@} := a.ToArray;
|
||||
var o := new TClass;
|
||||
var c{@var c: char;@} := o.f;
|
||||
var i{@var i: integer;@} := o.f2;
|
||||
end.
|
||||
Loading…
Reference in a new issue