On 04.05.2014 16:46, Xiangrong Fang wrote:
Hello All,

I have a unit here:

https://github.com/xrfang/pastats/blob/master/src/units/datalist.pas

which report this error:

/home/xrfang/git/pastats/src/units/datalist.pas(61,17) Warning: An
inherited method is hidden by "constructor TDataFrame.Create;"

However, the following code, which also define a new constructor without
using "overload", does NOT have such warning.

[snip]

If I use reintroduce, I can suppress this warning. But my question is,
why is this warning NOT displayed in the above sample code? In general,
shall I use "reintroduce" keyword? Is it related to generics?

If I remember correctly that warning appears if you have a non-virtual constructor with the same arguments as a virtual constructor of the base class. It should however not be related to generics in any way...

Regards,
Sven
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to