jdk-24/langtools/test/tools/javac/annotations/FinalReceiverTest.java
Paul Govereau 577b60e711 8027886: javac allows illegal receiver parameters
8029042: Receiver parameter not supported on local class constructor

Reviewed-by: jfranck, jlahoda
2014-06-11 12:49:10 -04:00

15 lines
339 B
Java

/*
* @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) {}
}
}
}