Incorrect type path for type annotations on wildcards

XMLWordPrintable

    • Type: Sub-task
    • Resolution: Not an Issue
    • Priority: P2
    • None
    • Affects Version/s: 8
    • Component/s: tools
    • Verified

      The following program should emit a class file with a RuntimeVisibleTypeAnnotations attribute on TestWildcard.meth with a type path of [WILDCARD]. Instead, the type path is [TYPE_ARGUMENT(0)].

      import java.lang.annotation.*;
      import static java.lang.annotation.RetentionPolicy.*;
      import static java.lang.annotation.ElementType.*;

      class WithArgs<T> {}

      public class TestWildcard {
        public void meth(WithArgs<@A @A @B @B ?> a) {}
      }

      @Retention(RUNTIME)
      @Target({TYPE_USE,TYPE_PARAMETER})
      @interface AC { A[] value(); }
      @Retention(RUNTIME)
      @Target({TYPE_USE,TYPE_PARAMETER})
      @Repeatable(AC.class)
      @interface A { }@Retention(RUNTIME)
      @Target({TYPE_USE})
      @interface BC { B[] value(); }
      @Retention(RUNTIME)
      @Target({TYPE_USE})
      @Repeatable(BC.class)
      @interface B { }

            Assignee:
            Eric Mccorkle
            Reporter:
            Eric Mccorkle
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: