[Mono-dev] Reason for introduction of CS0809 warning in mcs ?
marek.safar at seznam.cz
Sat Jan 6 12:54:08 EST 2007
> I noticed that very recently CS0809 was added to mcs, which warns against an
> obsolete member that overrides a non-obsolete member.
Yes, that's correct and I think Eno explained the issue nicely.
Whole issue is since the overriding obsolete method is likely to be called virtually
through the base class, and there is no easy way for the compiler to produce a sensible
warning on the virtual call through the base class, we should warn that the user
is doing something odd at the declaration of the obsolete member overriding non-obsolete
> This warning does not exist in csc (1.x and 2.x), and so I wonder why this
> was added. Is it considered a bad practice to mark a member obsolete in a
> derived class ?
Next version of csc will issue similar warning too.
More information about the Mono-devel-list