bug fix #447
This commit is contained in:
parent
01efad3d4f
commit
dccde94e62
|
|
@ -824,7 +824,13 @@ namespace PascalABCCompiler.PCU
|
||||||
{
|
{
|
||||||
name_array[i] = new NameRef(cur_cnn.functions[i - j].name, i);
|
name_array[i] = new NameRef(cur_cnn.functions[i - j].name, i);
|
||||||
if (cur_cnn.functions[i - j].ConnectedToType != null)
|
if (cur_cnn.functions[i - j].ConnectedToType != null)
|
||||||
|
{
|
||||||
name_array[i].special_scope = 1;
|
name_array[i].special_scope = 1;
|
||||||
|
if (cur_cnn.functions[i - j].return_value_type != null)
|
||||||
|
name_array[i].symbol_kind = symbol_kind.sk_overload_function;
|
||||||
|
else
|
||||||
|
name_array[i].symbol_kind = symbol_kind.sk_overload_procedure;
|
||||||
|
}
|
||||||
pools[cur_cnn.functions[i - j]] = name_array[i];
|
pools[cur_cnn.functions[i - j]] = name_array[i];
|
||||||
}
|
}
|
||||||
j = i;
|
j = i;
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
/// !! System unit
|
/// !! System unit
|
||||||
unit PABCSystem;
|
unit PABCSystem;
|
||||||
|
|
||||||
{$define PascalABC}
|
{$define PascalABC}
|
||||||
|
|
||||||
{$gendoc true}
|
{$gendoc true}
|
||||||
|
|
||||||
|
|
|
||||||
11
TestSuite/overloads7.pas
Normal file
11
TestSuite/overloads7.pas
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
var i: integer;
|
||||||
|
procedure p := Inc(i);
|
||||||
|
|
||||||
|
begin
|
||||||
|
var q := 3*p;
|
||||||
|
var q1 := p*3;
|
||||||
|
q;
|
||||||
|
assert(i=3);
|
||||||
|
q1;
|
||||||
|
assert(i=6);
|
||||||
|
end.
|
||||||
|
|
@ -107,7 +107,6 @@ var __initialized: boolean;
|
||||||
|
|
||||||
procedure __InitModule;
|
procedure __InitModule;
|
||||||
begin
|
begin
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure __InitModule__;
|
procedure __InitModule__;
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
/// !! System unit
|
/// !! System unit
|
||||||
unit PABCSystem;
|
unit PABCSystem;
|
||||||
|
|
||||||
{$define PascalABC}
|
{$define PascalABC}
|
||||||
|
|
||||||
{$gendoc true}
|
{$gendoc true}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue