Thu, 10 Oct 2013 14:58:04 +0200
8001931: The new build system whitespace cleanup
Reviewed-by: tbell, simonis, erikj
1 /*
2 * @test /nodynamiccopyright/
3 * @bug 8003280
4 * @summary Add lambda tests
5 * target typing in assignment context
6 * @author Maurizio Cimadamore
7 * @compile/fail/ref=TargetType04.out -XDrawDiagnostics TargetType04.java
8 */
9 class TargetType04 {
11 interface S<X extends Number, Y extends Number> {
12 Y m(X x);
13 }
15 S<Integer, Integer> s1 = i -> { return i; }; //ok
16 S<Double, Integer> s2 = i -> { return i; }; //no
17 S<Integer, Double> s3 = i -> { return i; }; //no
18 }