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

eou: Diagnostic for constructor call prior to 'super()' call is unclear

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P5
    • Resolution: Won't Fix
    • Affects Version/s: 1.1.4, 1.1.7
    • Fix Version/s: None
    • Component/s: tools
    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_95, windows_nt

      Description



      Name: joT67522 Date: 11/18/97


      In the following source code, the error message is referring to the implied reference
      to the this pointer which is passed to the inner class c'tor. This message is confusing
      since the user never sees the this pointer to which it is referring. Perhaps the message
      in this special case could explicitly state that an the c'tor for and inner class cannot be
      called in this context.


      public class outerobject
      {
         class innerobject
          {
          }

       public outerobject(Object o)
          {
         }

          public outerobject(int i)
          {
      // generates "Error: c:\Development\swing-0.5.1\com\sun\java\swing\nothis.java(18):
      // Can't reference this before the superclass constructor has been called."

      // since new inner object cannot obtain a implied pointer to outer object until it is contructed

             this (new innerobject());
          }

      }
      (Review ID: 20447)
      ======================================================================

        Attachments

          Activity

            People

            Assignee:
            gafter Neal Gafter
            Reporter:
            johsunw Joon Oh (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: