<div dir="ltr"><div dir="ltr">On Thu, Feb 9, 2023 at 3:59 PM Remi Forax <<a href="mailto:forax@univ-mlv.fr" target="_blank">forax@univ-mlv.fr</a>> wrote:</div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">> public class NarrowingNameClash {<br>
> <br>
>    public interface Upper<T> {<br>
>        void method(T param);<br>
>    }<br>
> <br>
>    public interface Lower<R> extends Upper<Class<R>> {<br>
>        void method(Class<?> param);        // erasure name clash here<br>
>    }<br>
> }<br>
> <br>
> This violates §8.4.8.3 because `method(Class<R>)` and `method(Class<?>)` have<br>
> the same erasure. However, the compiler is not reporting an error in this case.<br>
> <br>
> Here's my understanding of the bug... (reviewer please double-check this :)<br>
<br>
It's maybe a spec bug because you can still have a raw class that implement both interfaces.<br></blockquote><div><br></div>Apologies... I'm not completely getting what you're saying.</div><br><div class="gmail_quote">The point here is that "NarrowingNameClash" itself should not compile, so... ?</div><br><div class="gmail_quote">-Archie</div><div class="gmail_quote"><br></div>-- <br><div dir="ltr">Archie L. Cobbs<br></div></div>