On Tue, 5 Oct 2021 10:48:45 GMT, Pavel Rappo <pra...@openjdk.org> wrote:

> While in many cases diagnostics became more helpful, in the "unexpected 
> content" case (missing newline after the colon) it is now more confusing. 
> This is because the caret points to the colon and not to the unexpected 
> character which follows the colon. We will have to improve that later.

Two points:

1. (General) We probably have to be careful to ensure we don't try and point to 
a newline character. I'm not sure what the reporting system will do in that 
case. On the other hand, newline after colon is not an error, so we're probably 
OK in that case.
2. In the `javac` world, we found it better to report what was expected, more 
than just saying that what was found was unexpected. In this context, it would 
suggest replacing `unexpected content` with `newline expected after  ':'`.

-------------

PR: https://git.openjdk.java.net/jdk/pull/5812

Reply via email to