test/tools/javac/annotations/6881115/T6881115.java

Thu, 21 Feb 2013 15:27:05 +0000

author
mcimadamore
date
Thu, 21 Feb 2013 15:27:05 +0000
changeset 1600
3fef0cae83b3
parent 1521
71f35e4b93a5
child 2525
2eb010b6cb22
permissions
-rw-r--r--

8008444: Inherited generic functional descriptors are merged incorrectly
Summary: Missing call to Types.createMethodWithThrownTypes
Reviewed-by: jjg

     1 import java.lang.annotation.Target;
     2 import java.lang.annotation.ElementType;
     4 /*
     5  * @test /nodynamiccopyright/
     6  * @bug     6881115 6976649
     7  * @summary javac permits nested anno w/o mandatory attrs => IncompleteAnnotationException
     8  * @author  mcimadamore
     9  * @compile/fail/ref=T6881115.out -XDrawDiagnostics T6881115.java
    10  */
    12 @Target({ElementType.TYPE, ElementType.TYPE_PARAMETER, ElementType.ANNOTATION_TYPE})
    13 @interface A {
    14     B b() default @B(b2 = 1, b2 = 2);
    15     B[] b_arr() default {@B(), @B(b2 = 1, b2 = 2)};
    16 }
    18 @interface B {
    19     String b1();
    20     int b2();
    21 }
    23 @A(b = @B(b2 = 1, b2 = 2),
    24    b_arr = {@B(), @B(b2 = 1, b2 = 2)})
    25 class T6881115<@A(b = @B(b2 = 1, b2 = 2),
    26                   b_arr = {@B(), @B(b2 = 1, b2 = 2)}) X> {}

mercurial