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

Qualified new of static classes allowed in contradiction of the spec

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 1.1.6, 1.2.0, 1.2.1, 1.2.2, 1.3.0
    • Fix Version/s: 1.4.0
    • Component/s: tools
    • Subcomponent:
    • Resolved In Build:
      merlin
    • CPU:
      generic, x86, sparc
    • OS:
      generic, solaris_2.5.1, solaris_2.6, windows_95, windows_nt
    • Verification:
      Verified

      Description

      The compiler accepts the following:


      package p1;
      import p2.X;

      class D extends X {

       X.M m2 = new X().new M();

      }

      package p2;

      public class X {

        static public class M {
          public M(){}
        }

      }

      this contradicts the specification, which requires that the class being
      instantiated via a qualified class instance creation expression be an
      inner class.



      gilad.bracha@eng 1999-11-30

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              busersunw Btplusnull User (Inactive)
              Reporter:
              gbrachasunw Gilad Bracha (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: