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

Constructor namespace separate from method namespace?

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.1.5
    • tools
    • None
    • generic
    • generic

      The following code compiles just fine with our compiler, but fails in MS J++

      public class Construct {

          public Construct(){}
          public void Construct(){}

      }

      Obviously, the first is a constructor, the second is a method.

      However, I was unable to find the section of the JLS that specifies that constructor and method namespaces are separate. In fact, it is implied that they are the same.

      So, either I completely missed the section that discusses constructor naming issues, or either the spec or our compiler need to change.

            dstoutamsunw David Stoutamire (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: