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

missing DA error in anonymous ctor

XMLWordPrintable

    • mantis
    • generic
    • solaris_8

      The following is required to be an error because x is not
      definitely assigned where used.


      class T {
          final int x;
          final Object o = new Object() {
                  int y = x; // error: x not DA
              };
          {
              x = 12;
          }
      }

            gafter Neal Gafter (Inactive)
            gafter Neal Gafter (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: