inherited; not fully compatible with Delphi
Original Reporter info from Mantis: SergeAnvarov @SergeAnvarov
-
Reporter name: Serge Anvarov
Original Reporter info from Mantis: SergeAnvarov @SergeAnvarov
- Reporter name: Serge Anvarov
Description:
In OBJFPC mode, calling inherited is not supported for message methods if the handler in the base class was declared in the private section.
In DELPHI mode all OK, but it limits OBJFPC mode.
And this oddity is not documented.
Steps to reproduce:
{$MODE OBJFPC}{$H+}
uses Interfaces, StdCtrls, LMessages;
type
TTest = class(TComboBox)
procedure CNCommand(var TheMessage: TLMCommand); message CN_COMMAND; // Copied from TCustomComboBox declaration
end;
procedure TTest.CNCommand(var TheMessage: TLMCommand);
begin
inherited; // project1.lpr(12,12) Error: Wrong number of parameters specified for call to "CNCommand"
// customcombobox.inc(1078,27) Error: Found declaration: CNCommand(var TLMCommand);
end;
begin
end.
Mantis conversion info:
- Mantis ID: 35138
- Version: 3.3.1
- Monitored by: » @martok (Martok), » Vincent (Vincent Snijders)