Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8027181 Type Annotations Cleanup
  3. JDK-8027263

Incorrect type path for inner types

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Not an Issue
    • Icon: P3 P3
    • None
    • 8
    • tools
    • 8
    • Verified

      In the following code:

      class Outer {
          public static class Inner {}
      }
      public class Test {
          public Object meth() { return new Outer.@X Inner(); }
      }

      The type path of the annotation @X is empty. It should be [INNER_TYPE].

      Note that in the slightly different code

      class Outer {
          public class Inner {}
      }
      public class Test {
          public Object meth() { Outer o = new Outer(); return o.new @X Inner(); }
      }

      The type path is correct.

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

              Created:
              Updated:
              Resolved: