Is the below meant to be allowed?
It compiles, it also compiles if you have no default in the base, but a
default in the sub class.
type
TFoo = class
procedure Bar (const Item: String; AnObject: TObject = nil); virtual;
end;
TFoo2 = class(TFoo)
procedure Bar (const Item: String; AnObject: TObject); override;
end;
It even works with both having a diff default.
TFoo = class
procedure Bar (const Item: String; AnObject: integer = 1); virtual;
end;
TFoo2 = class(TFoo)
procedure Bar (const Item: String; AnObject: integer=2); override;
end;
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel