RFR JDK-8203813: javac accepts an illegal name as a receiver parameter name

Vicente Romero vicente.romero at oracle.com
Wed Jun 13 14:41:50 UTC 2018


Hi Bernard,

Thanks for the patch, it looks good to me, I will push it,

Vicente

On 06/13/2018 06:25 AM, B. Blaser wrote:
> I just fixed two typo mistakes in 'compiler.properties' and in
> 'WrongReceiver.java', as attached.
>
> Any feedback is welcome (tier1 is OK),
> Bernard
>
> On 9 June 2018 at 20:02, B. Blaser <bsrbnd at gmail.com> wrote:
>> Hi,
>>
>> As noted in the JBS issue, the following example should be rejected
>> because the receiver parameter name is invalid:
>>
>> class C {
>>      C c;
>>      void foo(C c.c) {
>>      }
>> }
>>
>> The suggested fix is to make the parser conform to the receiver
>> parameter syntax (JLS10 §8.4.1):
>>
>> ReceiverParameter:
>>      {Annotation} UnannType [Identifier .] this
>>
>> Tier1 is OK.
>>
>> Any feedback is welcome,
>> Bernard
>>
>>
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8203813



More information about the compiler-dev mailing list