RFR: JDK-8205418: Assorted improvements to source code model
Maurizio Cimadamore
maurizio.cimadamore at oracle.com
Fri Jun 22 12:37:28 UTC 2018
On 22/06/18 13:32, Maurizio Cimadamore wrote:
> When messages are simplified, basically we turn errors into other
> errors - e.g. look at InapplicableSymbol_S_Error::getDiagnostic -
> there is some logic and then, if there's really onlt one relevant
> candidate, we go back to an InapplicableSymbol (without S) error,
> where 'errCandidate' is overridden to return the filtered symbol.
>
> Another reason to rely more on errCandidate
More specifically, if simplified diagnostics are disabled, you go remain
in the multiple symbols world, which means you still have more
candidates and you fail to see that only one was really the good one.
So, I think InapplicableSymbolsError should override bestCandidate
(which I also suggested in previous email), and should call
filterCandidates before doing the processing. This will ensure that
'redundant' candidates are dropped, and you get back the symbol that is
most likely to be the correct one.
Maurizio
More information about the compiler-dev
mailing list