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

B. Blaser bsrbnd at gmail.com
Wed Jun 13 10:25:11 UTC 2018


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jdk8203813.patch
Type: text/x-patch
Size: 2863 bytes
Desc: not available
URL: <http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20180613/dea9d765/jdk8203813.patch>


More information about the compiler-dev mailing list