Mon, 21 Jan 2013 11:16:28 -0800
Merge
mcimadamore@1415 | 1 | /* |
mcimadamore@1415 | 2 | * @test /nodynamiccopyright/ |
mcimadamore@1415 | 3 | * @bug 8003280 |
mcimadamore@1415 | 4 | * @summary Add lambda tests |
mcimadamore@1415 | 5 | * complex case of lambda return type that depends on generic method |
mcimadamore@1415 | 6 | * inference variable |
mcimadamore@1415 | 7 | * @compile/fail/ref=TargetType20.out -XDrawDiagnostics TargetType20.java |
mcimadamore@1415 | 8 | */ |
mcimadamore@1415 | 9 | import java.util.*; |
mcimadamore@1415 | 10 | |
mcimadamore@1415 | 11 | class TargetType20 { |
mcimadamore@1415 | 12 | |
mcimadamore@1415 | 13 | interface SAM2<X> { |
mcimadamore@1415 | 14 | List<X> f(); |
mcimadamore@1415 | 15 | } |
mcimadamore@1415 | 16 | |
mcimadamore@1415 | 17 | class Test { |
mcimadamore@1415 | 18 | <Z> void call(SAM2<Z> x, SAM2<Z> y) { } |
mcimadamore@1415 | 19 | { call(() -> Collections.emptyList(), () -> new ArrayList<String>()); } |
mcimadamore@1415 | 20 | } |
mcimadamore@1415 | 21 | } |