On Mon, Apr 6, 2009 at 10:15 PM, Graeme Geldenhuys <[email protected]> wrote: > 2009/4/6 Flávio Etrusco <[email protected]>: >> Actually, your constructor has the same signature as 'TObject.Create', >> so it should show a 'lower visibility' warning in Delphi, doesn't it? > > Correct, Delphi should also give this warning.
If it was a visibility "escalation" problem i agree, but Delphi Did Noy complain about this one (and yes, Delphi complains if this happens for other visibility problems). And, i don't put an override to the constructor, so in my class the constructor is really a virtual override of the TObject.Create? And, as Flavio Etrusco said: > But, indeed, FPC shows the warning (should be public) for all > constructors, even if you're not hiding from the parent class, and I > always found this a (minor) annoyance. And it's true, it always complain! The problem in this case is not a break of contract (class interface), in my opinion is a problem of compiler interpretation, it Always require constructors to be Public, we just need read the warning message again: "Warning: Constructor should be public" Otherwise (break of contract), it would be an error right? Léo Willian Kölln _______________________________________________ fpc-devel maillist - [email protected] http://lists.freepascal.org/mailman/listinfo/fpc-devel
