test/tools/javac/lambda/LambdaConv25.java

changeset 1600
3fef0cae83b3
parent 0
959103a6100f
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/test/tools/javac/lambda/LambdaConv25.java	Thu Feb 21 15:27:05 2013 +0000
     1.3 @@ -0,0 +1,21 @@
     1.4 +/*
     1.5 + * @test /nodynamiccopyright/
     1.6 + * @summary check that merged inherited descriptors preservers type-parameters
     1.7 + * @compile/fail/ref=LambdaConv25.out -XDrawDiagnostics LambdaConv25.java
     1.8 + */
     1.9 +class LambdaConv25 {
    1.10 +
    1.11 +    interface A {
    1.12 +        <X> void m();
    1.13 +    }
    1.14 +
    1.15 +    interface B {
    1.16 +        <X> void m();
    1.17 +    }
    1.18 +
    1.19 +    interface C extends A, B { }
    1.20 +
    1.21 +    void test() {
    1.22 +        C c = ()->{}; //should fail
    1.23 +    }
    1.24 +}

mercurial