On 04.02.2015 19:58, silvioprog wrote:
Hello,
First, please test the code below in Delphi and after in FPC:
TTest = class
public
class constructor Create;
constructor Create; virtual;
end;
...
constructor TTest.Create;
begin
end;
class constructor TTest.Create;
begin
end;
OK, it will compile fine. Now test the code below in Delphi and after in
FPC (just changing the declaration order of the methods):
TTest = class
public
constructor Create; virtual;
class constructor Create;
end;
...
constructor TTest.Create;
begin
end;
class constructor TTest.Create;
begin
end;
In Delphi it compile fine, but in FPC:
=======
Compile Project, Target: project1.exe: Exit code 1, Errors: 1, Warnings: 1
unit1.pas(23,23) Warning: An inherited method is hidden by "class
constructor Create;"
unit1.pas(39,25) Error: method identifier expected
=======
Bug?
Yes. Please report.
Regards,
Sven
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal