On Sun, Mar 31, 2013 at 7:36 AM, Mark Morgan Lloyd <markmll.fpc-pas...@telemetry.co.uk> wrote: > I wonder whether anybody could throw some light on a curious error. I've > just tried to move a class definition into the interface part of a unit, so > that I could easily add a class helper, but I'm getting an error > > borgumserverinterface.pas(927,24) Error: (3048) function header doesn't > match any method of this class > "TzzConnection.ExecuteSQL2(TStringList,Boolean="FALSE"):Boolean;" > > If I move the class back into the implementation part there's no error. > Simplified code as below: > > interface > > uses > Classes, SysUtils, StrUtils, BorgUMFingerD, BorgUMCode, sqldb; > > type > TzzConnection= class(TObject) > .. > public > .. > function ExecuteSQL2(sl: TStringList; > relaxInuseCheck: boolean= false): boolean; > .. > > implementation > > uses pqconnection, ibconnection, Custom, postgres3dyn, ibase60dyn, Regexpr; > .. > > function TzzConnection.ExecuteSQL2(sl: TStringList; relaxInuseCheck: > boolean= false): boolean; > .. > > It's that final declaration that goes wrong, but I can fix it by moving the > class back into the implementation part. FPC 2.6.2 on Linux x86. > > -- > Mark Morgan Lloyd > markMLl .AT. telemetry.co .DOT. uk
The simplified code also fails? Removing the default parameter value from the implementation makes any difference? -Flávio _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal