diff -r 000000000000 -r 959103a6100f test/tools/javac/lambda/EffectivelyFinal01.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/tools/javac/lambda/EffectivelyFinal01.java Wed Apr 27 01:34:52 2016 +0800 @@ -0,0 +1,18 @@ +/* + * @test /nodynamiccopyright/ + * @bug 8003280 + * @summary Add lambda tests + * effectively final check fails on method parameter + * @compile/fail/ref=EffectivelyFinal01.out -XDrawDiagnostics EffectivelyFinal01.java + */ +class EffectivelyFinal01 { + + interface SAM { + Integer m(Integer i); + } + + void test(Integer nefPar) { + SAM s = (Integer h) -> { Integer k = 0; return k + h + nefPar; }; + nefPar++; //non-effectively final + } +}