Would it make sense to make missing/incorrect method errors be above generics errors?
David Alayachew
davidalayachew at gmail.com
Tue Jan 28 19:07:55 UTC 2025
Hello Compiler Dev Team,
I am coming in entirely ignorant of how the compiler works under the hood.
I am trying to correct this ignorance, but I hope you'll forgive an
ignorant question in the meantime.
Would it make sense to have missing method errors (can't find symbol) be
above errors like invalid method references (trying to use non-static
method in static context)?
Basically, I am just asking to alter the output order of compile time
errors. We all have run into situations where we get this nightmarish
generics error, and the actual error is that we mispelled a method name or
something. However, the misspelled error is usually beneath the ugly
generics error.
If the top of the list was a "can't find symbol", that would make it much
more obvious what the problem is. Then, when the problem actually is our
generics, then it will be unambiguous as opposed to trying to parse the
many errors in compile time.
Of course, if altering error output order is a pandora's box that we don't
want to open, then I understand. From my ignorant opinion, altering the
output order of an already compiled list seems easy, but maybe there are
rules in place that prevent that, or we don't want to mess with people's
mental model. Or maybe we are expected to have read the entire list of
errors and parse the best next steps only after having read the whole thing
lol. I don't know.
Thank you for your time and help.
David Alayachew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/compiler-dev/attachments/20250128/1d3c3d5e/attachment-0001.htm>
More information about the compiler-dev
mailing list