Warn about problematic forward references

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Rejected
    • Priority: P4
    • None
    • Affects Version/s: 6
    • Component/s: tools
    • generic
    • generic

      The following program compiles:

      class Test {
          static Object x = Test.x;
      }
      This is rejected by javac:

      class Test {
          static Object x = x;
      }

      Since Test.x and x represent the same variable should the compiler
      reject both programs?

            Assignee:
            Unassigned
            Reporter:
            Peter Ahe
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: