mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 02:54:35 +02:00
8027886: javac allows illegal receiver parameters
8029042: Receiver parameter not supported on local class constructor Reviewed-by: jfranck, jlahoda
This commit is contained in:
parent
3ea78c679c
commit
577b60e711
8 changed files with 89 additions and 27 deletions
|
@ -0,0 +1,14 @@
|
|||
/*
|
||||
* @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) {}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue