Incorrect annotation attributes for type annotations on constructor type parameters

XMLWordPrintable

    • Type: Sub-task
    • Resolution: Fixed
    • Priority: P2
    • 9
    • Affects Version/s: 8
    • Component/s: tools
    • b19
    • Not verified

      The following code should generate RuntimeVisibleTypeAnnotations attributes the method m, annotating the new instruction as well as the constructor invocation.

      import java.lang.annotation.*;

      @Retention(RetentionPolicy.RUNTIME)
      @Target(ElementType.TYPE_USE)
      @interface X {}
      interface Foo<T> {}
      class Test { void m() { new Foo<@X String>() {}; } }

      At present, neither are generated.

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

              Created:
              Updated:
              Resolved: