[Issue 1449] deprecated methods are counted as interface implementation
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Jun 16 07:26:52 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=1449
--- Comment #12 from yebblies <yebblies at gmail.com> 2011-06-16 07:22:09 PDT ---
(In reply to comment #10)
>
> It does so implicitly.
>
> If you have
>
> Bar b = new Foo;
>
> and do
>
> b.foo();
>
> the compiler will not be able to catch it, as it cannot know whether an
> arbitrary Bar instance actually is an instance of Foo. So at runtime, a
> deprecated function will be called, or attempted to be called.
>
> The spec probably does not cover this particular usecase, but it seems to me
> that it is worth a warning. It just doesn't make sense to have an
> implementation be deprecated, when the same function in the interface is not.
I agree. I think it should be an error to override a non-deprecated function
with a deprecated one. It should probably be an error to override a deprecated
function with a non-deprecated one too.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list