Community
Participate
Working Groups
The latest spec doesn't allow modifiers on explicit 'this' parameters: FormalParameterOrReceiverDecls: Type [Identifier .] this [, FormalParameterDecls] FormalParameterDecls The javac allows final but rejects static. But as per the spec, all modifiers should be rejected on receiver params.
Created attachment 228458 [details] Proposed fix Just a note about having the modifier check for receiver in AbstractMethodDeclaration.resolveReceiver() - The only reason for doing this is to get the correct range for error reporting.
Patch looks good. Released here:http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?h=BETA_JAVA8&id=f875f4161e47c5087f589529b7e7ee5cf66c1b26
Please run all Java 8 tests before posting a patch. CompilerInvocationTests was missing a change and failing. Fixed here: http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?h=BETA_JAVA8&id=1c1d418ad63ddf8e8c36736ccc520ce9790f3c20
*** Bug 420125 has been marked as a duplicate of this bug. ***