langtools/test/tools/javac/annotations/FinalReceiverTest.java
author pgovereau
Wed, 11 Jun 2014 12:49:10 -0400
changeset 24903 41e1812d6b4c
permissions -rw-r--r--
8027886: javac allows illegal receiver parameters 8029042: Receiver parameter not supported on local class constructor Reviewed-by: jfranck, jlahoda

/*
 * @test /nodynamiccopyright/
 * @bug 8027886
 * @summary Receiver parameters must not be final
 * @compile/fail/ref=FinalReceiverTest.out  -XDrawDiagnostics FinalReceiverTest.java
 */

class FinalReceiverTest {
    void m() {
        class Inner {
            Inner(final FinalReceiverTest FinalReceiverTest.this) {}
        }
    }
}