1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/test/tools/javac/lambda/funcInterfaces/NonSAM1.java Wed Apr 27 01:34:52 2016 +0800 1.3 @@ -0,0 +1,14 @@ 1.4 +/* 1.5 + * @test /nodynamiccopyright/ 1.6 + * @bug 8003280 1.7 + * @summary Add lambda tests 1.8 + * This test is for identifying a non-SAM type 6: An interface that has a single abstract method, which is also public method in Object 1.9 + * @compile/fail/ref=NonSAM1.out -XDrawDiagnostics NonSAM1.java Helper.java 1.10 + */ 1.11 + 1.12 +public class NonSAM1 { 1.13 + void method() { 1.14 + Planet n = (Object o) -> true; 1.15 + System.out.println("never reach here " + n); 1.16 + } 1.17 +}