javac allows import statement for current class, contrary to JLS 8.1 p.129

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 1.4.0
    • Affects Version/s: 1.1
    • Component/s: tools
    • merlin
    • generic
    • solaris_2.5.1
    • Verified

      When a java class contains an import statement which names itself,
      fastjavac declares an error (and javac doesn't).

      import A;
      public class A {
       A() {}
      }

      Java WorkShop 2.0 fastjavac 1.0 Copyright (c) 1997 Sun Microsystems, Inc.
      A.java:2: Class name A clashes with imported class on line 1
      public class A {
                   ^
      1 error

      This turns up all over our code as a result of a preprocessor which expands
      import statements with "*" to an explicit list of classes.

            Assignee:
            Btplusnull User (Inactive)
            Reporter:
            Fred Oliver (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: