[prev in list] [next in list] [prev in thread] [next in thread]
List: openjdk-compiler-dev
Subject: Re: RFR: JDK-8189796: Incorrect end position for missing statement
From: Jan Lahoda <jan.lahoda () oracle ! com>
Date: 2017-10-24 8:24:19
Message-ID: 59EEF8B3.4080209 () oracle ! com
[Download RAW message or body]
On 24.10.2017 10:08, Maurizio Cimadamore wrote:
> Looks good - meta-observation: at some point we should (i) make sure
Thanks!
> that all errors generated in the parser go through some uniform routine
> (such as syntaxError) and also that (ii) such routine is updated to use
> the new diagnostic keys instead of strings and varargs.
Agreed on both.
Jan
>
> Maurizio
>
>
> On 23/10/17 12:50, Jan Lahoda wrote:
>> 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
>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic