diff --git a/Compiler/PCU/PCUWriter.cs b/Compiler/PCU/PCUWriter.cs index c3121151a..7d24de866 100644 --- a/Compiler/PCU/PCUWriter.cs +++ b/Compiler/PCU/PCUWriter.cs @@ -824,7 +824,13 @@ namespace PascalABCCompiler.PCU { name_array[i] = new NameRef(cur_cnn.functions[i - j].name, i); if (cur_cnn.functions[i - j].ConnectedToType != null) + { 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]; } j = i; diff --git a/TestSuite/CompilationSamples/PABCSystem.pas b/TestSuite/CompilationSamples/PABCSystem.pas index de9f72235..30fb3ad6f 100644 --- a/TestSuite/CompilationSamples/PABCSystem.pas +++ b/TestSuite/CompilationSamples/PABCSystem.pas @@ -5,7 +5,7 @@ /// !! System unit unit PABCSystem; - {$define PascalABC} +{$define PascalABC} {$gendoc true} diff --git a/TestSuite/overloads7.pas b/TestSuite/overloads7.pas new file mode 100644 index 000000000..9f5ba0b13 --- /dev/null +++ b/TestSuite/overloads7.pas @@ -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. \ No newline at end of file diff --git a/bin/Lib/PABCExtensions.pas b/bin/Lib/PABCExtensions.pas index ccd96078e..cde65de8c 100644 --- a/bin/Lib/PABCExtensions.pas +++ b/bin/Lib/PABCExtensions.pas @@ -107,7 +107,6 @@ var __initialized: boolean; procedure __InitModule; begin - end; procedure __InitModule__; diff --git a/bin/Lib/PABCSystem.pas b/bin/Lib/PABCSystem.pas index de9f72235..30fb3ad6f 100644 --- a/bin/Lib/PABCSystem.pas +++ b/bin/Lib/PABCSystem.pas @@ -5,7 +5,7 @@ /// !! System unit unit PABCSystem; - {$define PascalABC} +{$define PascalABC} {$gendoc true}