RFR: 8036019: Insufficient alternatives listed in some errors produced by the parser
Vicente Romero
vromero at openjdk.java.net
Wed Jan 19 18:02:57 UTC 2022
On Wed, 19 Jan 2022 17:28:29 GMT, Aggelos Biboudis <duke at openjdk.java.net> wrote:
>> Indeed, that was my observation as well but then I noticed this:
>>
>> https://bugs.openjdk.java.net/browse/JDK-8012722
>>
>> This is among the positive tests of that contribution, which exists on master:
>>
>>
>> public class SingleCommaAnnotationValue {
>> @Foo({}) void a() { }
>> @Foo({,}) void b() { }
>> @Foo({0}) void c() { }
>> @Foo({0,}) void d() { }
>> @Foo({0,0}) void e() { }
>> @Foo({0,0,}) void f() { }
>> }
>> @interface Foo { int[] value(); }
>>
>>
>> What do you think?
>
> To my understanding the following rule permits `{,}`:
>
>
> ElementValueArrayInitializer:
> { [ElementValueList] [,] }
> ElementValueList:
> ElementValue {, ElementValue}
I see, thanks for the clarification
-------------
PR: https://git.openjdk.java.net/jdk/pull/7019
More information about the compiler-dev
mailing list