Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4054523

no access to an inner class declared in a method of another innner class

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      1.2beta
    • CPU:
      generic, x86, sparc
    • OS:
      solaris_2.5.1, windows_nt
    • Verification:
      Verified

      Description



      Name: laC46010 Date: 05/27/97



      All compilers from JDK1.1 thru JDK1.1.2F fail to find an inner class, declared
      within a method of another inner class.
      In example "Test" below, JDK reports the following compile-time error:


      Test.java:5: Class Test. 1$B not found in type declaration.
      B b;
      ^
      1 error


      It seems the reason of the failure is that compiler transforms the name of
      class B into "Test$1$B" rather than into "Test$A$1$B" as prescribed by the
      "Inner Classes in Java 1.1" specification.


      --------------------Test.java----------------------
      public class Test {
      class A {
      void m() {
      class B {}
      B b;
      }
      }
      }
      ---------------------------------------------------------


      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              wmaddoxsunw William Maddox (Inactive)
              Reporter:
              leosunw Leo Leo (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: