Uncertainty about fix for JDK-5059679

Archie Cobbs archie.cobbs at gmail.com
Tue Feb 14 15:53:01 UTC 2023


On Mon, Feb 13, 2023 at 8:07 PM Alex Buckley <alex.buckley at oracle.com>
wrote:

> On 2/13/2023 5:06 PM, Dan Smith wrote:
> >>   * The signature of m1 is not a subsignature (§8.4.2) of the
> >>     signature of m2 as a member of the supertype of C that names A.
> >>   * The declared signature of m1 or some method m1 overrides (directly
> >>     or indirectly) has the same erasure as the declared signature of
> >>     m2 or some method m2 overrides (directly or indirectly).
> >>
> > Note the distinction in these rules between "signature of m2 as a member
> of the
> > supertype of C that names A" (third rule) and "declared signature of m2"
> (fourth rule)
> >
> > I would interpret the first to mean the signature '(Class<R>)->void',
> > and the second to mean the signature '(T)->void'. Since the erasure of
> > 'T' is 'Object', the fourth rule doesn't apply, and there's no error.
>
> Right, I was headed in this direction too -- the choice of language in
> the different bullets was intended to be significant. I'm happy to agree
> that, after all, no compile-time error is due.
>

Thanks to you both for helping clarify this. I'll retract my PR and resolve
this issue as "Not a Bug".

-Archie

-- 
Archie L. Cobbs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/compiler-dev/attachments/20230214/a6e1c35f/attachment.htm>


More information about the compiler-dev mailing list