Incorrect forward reference diagnostic for local variable initializer

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P1
    • 1.3.0
    • Affects Version/s: 1.3.0
    • Component/s: tools
    • rc2
    • sparc
    • solaris_7

      During compile the following simple code

      class test {
          public static void main (String [] args) {
              int i = (i = 10) + i++;
              int n = (n = 0);
          }
      }

      I've got the error message:

      <cos@ultrasparrow: ~/temp(318)> /usr/java1.3/bin/javac -server test.java
      test.java:3: illegal forward reference
              int i = (i = 10) + i++;
                                 ^
      1 error

      With Java1.2 it has been compiled pretty fine.

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: