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

Compiler confused by parenthesized "this" in final fields assignments

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 11
    • 8-pool, 9, 10, 11
    • tools
    • None
    • b18

        The following code fails:

        class Unassigned {
          final int x;

          Unassigned() {
            (this).x = 1;
          }
        }

        While removing parentheses make it working.

              mcimadamore Maurizio Cimadamore
              mcimadamore Maurizio Cimadamore
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: