diff -r 000000000000 -r 959103a6100f test/tools/javac/lambda/MethodReference40.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/tools/javac/lambda/MethodReference40.java Wed Apr 27 01:34:52 2016 +0800 @@ -0,0 +1,24 @@ +/* + * @test /nodynamiccopyright/ + * @bug 8003280 + * @summary Add lambda tests + * check that unbound constructor reference are not accepted + * @compile/fail/ref=MethodReference40.out -XDrawDiagnostics MethodReference40.java + */ +class MethodReference40 { + + static class Sup { + class Inner { + Inner(String val) { } + } + } + + static class Sub extends Sup { + + interface SAM { Sup.Inner m(Sub x, String str); } + + void test() { + SAM var = Sub.Inner::new; + } + } +}