Class helper with overloaded method name same as extending class does not compile
Original Reporter info from Mantis: lacak @lacak.sk
-
Reporter name: LacaK
Original Reporter info from Mantis: lacak @lacak.sk
- Reporter name: LacaK
Description:
When I extend class with helper which introduces method (marked as overload!) with same name as exists in original class, then I can not compile with error:
Wrong number of parameters specified for call to ...
Steps to reproduce:
uses
Classes, SysUtils, sqldb;
type
{ TSQLQueryHelper }
TSQLQueryHelper = class helper for TSQLQuery
public
procedure ExecSQL(const Fmt: string; const Args: array of const); overload;
end;
procedure TSQLQueryHelper.ExecSQL(const Fmt: string; const Args: array of const);
begin
Self.SQL.Text := Format(Fmt, Args);
Self.ExecSQL;
end;
var
q: TSQLQuery;
begin
q := TSQLQuery.Create(nil);
q.ExecSQL('',[]); // test_helper.lpr(51,19) Error: Wrong number of parameters specified for call to "ExecSQL"
end.
Additional information:
This works in Delphi XE
Mantis conversion info:
- Mantis ID: 30761
- Version: 3.0.0
- Fixed in version: 3.1.1
- Fixed in revision: 35024 (#d9ea6aae)