RFR 8057650: uniform error diagnostics for inconsistent inherited method signatures

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

RFR 8057650: uniform error diagnostics for inconsistent inherited method signatures

Maurizio Cimadamore
Hi,
the following is a simple patch which consolidates similar diagnostics
caused by incompatible overrides - the diagnostics are all of the form:

type A and B are incompatible because...

So I created a toplevel key for the 'type are incompatible' bit, and a
bunch of fragments for the various possible erroneous situations. See
webrev here:

http://cr.openjdk.java.net/~mcimadamore/8057650/

As usual, I've also attached some examples of the touched diagnostic
keys, as a reference.

Note that, since I was there, I made one of the diagnostics better - the
key for 'diff.ret' used to take a String argument, while now takes a
(method) name and a list of types (the parameters), which is consistent
with other similar diagnostics, and avoids premature string-ification.

Cheers
Maurizio

Reply | Threaded
Open this post in threaded view
|

Re: RFR 8057650: uniform error diagnostics for inconsistent inherited method signatures

Vicente Romero-2
looks good.

Vicente

On 12/20/2017 08:00 AM, Maurizio Cimadamore wrote:

> Hi,
> the following is a simple patch which consolidates similar diagnostics
> caused by incompatible overrides - the diagnostics are all of the form:
>
> type A and B are incompatible because...
>
> So I created a toplevel key for the 'type are incompatible' bit, and a
> bunch of fragments for the various possible erroneous situations. See
> webrev here:
>
> http://cr.openjdk.java.net/~mcimadamore/8057650/
>
> As usual, I've also attached some examples of the touched diagnostic
> keys, as a reference.
>
> Note that, since I was there, I made one of the diagnostics better -
> the key for 'diff.ret' used to take a String argument, while now takes
> a (method) name and a list of types (the parameters), which is
> consistent with other similar diagnostics, and avoids premature
> string-ification.
>
> Cheers
> Maurizio
>