<div dir="ltr">We have this unit test <span style="font-family:monospace">diags/examples/NameClashSameErasureNoOverride1.java:</span><div style="margin-left:40px"><span style="font-family:monospace"><br></span></div><div style="margin-left:40px"><span style="font-family:monospace">// key: compiler.err.name.clash.same.erasure.no.override.1<br><br>public class NameClashSameErasureNoOverride1 {<br><br>    interface I<X> {<br>        void m(X l);<br>    }<br><br>    class A {<br>        void m(Object l) {}<br>    }<br><br>    class B extends A implements I<Integer> {<br>        public void m(Integer l) {}<br>    }<br>}</span><br></div><div><br></div><div>This program is NOT supposed to compile, but rather fail with "name clash: ... two methods with the same erasure, yet neither overrides the other".</div><div><br></div><div>It seems like the erasure of <span style="font-family:monospace">A.m()</span> is <span style="font-family:monospace">m(Object)</span> and the erasure of <span style="font-family:monospace">B.m()</span> is <span style="font-family:monospace">m(Integer)</span> - and these are not the same, so there's no clash.<br></div><div><br></div><div>What am I missing?<br></div><div><br></div><div>Thanks,</div><div>-Archie</div><div><br></div><div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">Archie L. Cobbs<br></div></div></div>