imports versus erasure of inner classes

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Future Project
    • Priority: P4
    • None
    • Affects Version/s: 5.0
    • Component/s: specification
    • generic
    • solaris_8

      The problem of referring to a nonstatic class from a static context is the same when the name is available by virtue of being imported. Does an imported class name always have an erased outer?


      package p;

      import p.A.C;

      class A<T> {
          public class C {
              T x = null;
          }
      }

      class Main {
          {
              C c = null;
              c.x = "foo"; // what is the type of c.x?
          }
      }

            Assignee:
            Alex Buckley
            Reporter:
            Neal Gafter (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: