diff -r 000000000000 -r 959103a6100f test/tools/javac/lambda/MethodReference54.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/tools/javac/lambda/MethodReference54.java Wed Apr 27 01:34:52 2016 +0800 @@ -0,0 +1,19 @@ +/* + * @test /nodynamiccopyright/ + * @bug 8003280 + * @summary Add lambda tests + * method call with bad qualifier generates NPE if argument is a method reference + * @compile/fail/ref=MethodReference54.out -XDrawDiagnostics MethodReference54.java + */ +class MethodReference54 { + + interface SAM { + void m(); + } + + void test() { + nonExistent.m(MethodReference54::get); + } + + static String get() { return ""; } +}