<div dir="ltr">2013/2/23 deadalnix <span dir="ltr"><<a href="mailto:deadalnix@gmail.com" target="_blank">deadalnix@gmail.com</a>></span><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
On Friday, 22 February 2013 at 15:15:02 UTC, kenji hara wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="im">
2013/2/23 deadalnix <<a href="mailto:deadalnix@gmail.com" target="_blank">deadalnix@gmail.com</a>><br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
class A {<br>
    void foo() {}<br>
}<br>
<br>
class B {<br>
    override void foo() const {}<br>
}<br>
<br>
Add a const foo method to A, and B;foo don't overload the same method<br>
anymore.<br>
<br>
</blockquote>
<br></div><div class="im">
B.foo overrides A.foo. It is properly allowed as a particular case in<br>
contravariant parameter type.<br>
<br>
Kenji Hara<br>
</div></blockquote>
<br>
I know that. Now if you add a const version of foo in A, B;foo don't override the same method anymore.<br>
</blockquote></div><br></div><div class="gmail_extra" style>Yes, then the B's definition should raise "mutable A.foo() is not overridden but hidden in B" (but doesn't because of bug 8366).</div><div class="gmail_extra" style>
<br></div><div class="gmail_extra" style>Kenji Hara</div></div>