type-annotations in anon classes are written are regular annotations

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P2
    • None
    • Affects Version/s: None
    • Component/s: tools

      In this case,
      class TestOne<T> { // TestN.class
           Object mtest( TestOne<T> t){ return null; }

          public void test() {
              mtest( new TestOne<T>() { // TestN$1
                      class InnerAnon<U> { // TestN$1$InnerAnon.class
                          @F String ia_m1(){ return null; };
                      }
                      InnerAnon<String> IA = new InnerAnon< String>();
                 });
         }
      }
      @Retention(RUNTIME) @Target(TYPE_USE) @interface F { }

      @F is written to class file as a regular annotation on ia_m1().

            Assignee:
            Steve Sides (Inactive)
            Reporter:
            Steve Sides (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: