RFR: JDK-8189796: Incorrect end position for missing statement
Jan Lahoda
jan.lahoda at oracle.com
Mon Oct 23 11:50:55 UTC 2017
Hi,
Consider code like:
{
if (true)
}
(i.e. missing statement after "if"). The if statement will get parsed as
"if (true) (ERROR);", which appears OK, but the end position for
"(ERROR);" and "(ERROR)" is not set. In addition, due to this, the end
pos of the error/diagnostic produced is -1.
Bug: https://bugs.openjdk.java.net/browse/JDK-8189796
Proposed patch: cr.openjdk.java.net/~jlahoda/8189796/webrev.00/
Thanks,
Jan
More information about the compiler-dev
mailing list