langtools/test/tools/javac/lambda/typeInference/InferenceTest_neg5.java
changeset 19943 669e1adcbf50
parent 19905 dd285b441e44
parent 19942 e9dae0e41075
child 19944 b039e3b8701a
--- a/langtools/test/tools/javac/lambda/typeInference/InferenceTest_neg5.java	Thu Sep 12 11:09:20 2013 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-/*
- * @test /nodynamiccopyright/
- * @bug 8003280
- * @summary Add lambda tests
- *  Missing cast to SAM type that causes type inference to not work.
- * @compile/fail/ref=InferenceTest_neg5.out -XDrawDiagnostics InferenceTest_neg5.java
- */
-
-import java.util.*;
-
-public class InferenceTest_neg5 {
-    public static void main(String[] args) {
-        InferenceTest_neg5 test = new InferenceTest_neg5();
-        test.method1(n -> {});
-        test.method1((SAM1<String>)n -> {});
-        test.method1((SAM1<Integer>)n -> {n++;});
-        test.method1((SAM1<Comparator<String>>)n -> {List<String> list = Arrays.asList("string1", "string2"); Collections.sort(list,n);});
-        test.method1((SAM1<Thread>)n -> {n.start();});
-    }
-
-    interface SAM1<X> {
-        void m1(X arg);
-    }
-
-    <X> void method1(SAM1<X> s) {}
-}