Javac accepts interface fields without variable initializer

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 1.3.0
    • Affects Version/s: 1.3.0
    • Component/s: tools
    • kestrel
    • generic
    • generic

      The 1.3 compiler accepts the following program:

      interface InterfaceBug {

        int i = 10, j, k;
      }


      Old javac rightly rejects this, since j and k have not been initialized.
      Note that you cannot get 1.3 to accept:

      interface InterfaceBug {

        int i, j, k;
      }

      gilad.bracha@eng 1999-10-20

            Assignee:
            William Maddox (Inactive)
            Reporter:
            Gilad Bracha (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: