Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2022-01

Interface section overload procedures are all public

3 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Rainer Stratmann
// making only one procedure bugtest public in the interface section
// makes all other bugtest procedures public as well!
// Lazarus 2.0.0+dfsg-2
// FPC-Version: 3.0.4
// OS: Linux Debian 32 Bit
unit test;
interface
procedure bugtest( p1 : longint );
implementation
procedure bugtest( p1 : longint );
begin
end;
procedure bugtest( p1 , p2 : longint );
begin
end;
procedure bugtest( p1 , p2 , p3 : longint );
begin
end;
begin
end.
// Somewhere in the main program
 bugtest( 1 );
 bugtest( 1 , 2 );
 bugtest( 1 , 2 , 3 );
Bart
to Rainer Stratmann
PM Rainer Stratmann wrote 5 lines
// making only one procedure bugtest public in the interface section // makes all other bugtest procedures public as well! // Lazarus 2.0.0+dfsg-2 // FPC-Version: 3.0.4 // OS: Linux Debian 32 Bit

Not so in fpc 3.2.2.
So, most likely a bug that got fixed.

Bart
Sven Barth
to Bart

Bart via fpc-pascal schrieb am So., 23.
Jan. 2022, 21:43:

Show quoted text 12 lines
On Sun, Jan 23, 2022 at 6:12 PM Rainer Stratmann via fpc-pascal wrote: > // making only one procedure bugtest public in the interface section > // makes all other bugtest procedures public as well! > // Lazarus 2.0.0+dfsg-2 > // FPC-Version: 3.0.4 > // OS: Linux Debian 32 Bit Not so in fpc 3.2.2. So, most likely a bug that got fixed.

Yes, I remember that there was a bug report about that...

Regards,
Sven