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

Incorrect forward reference diagnostic for local variable initializer

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P1
    • 1.3.0
    • 1.3.0
    • tools
    • rc2
    • sparc
    • solaris_7

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: