javac is incorrectly implementing the DA/DU rules for for-loops

XMLWordPrintable

    • Type: Bug
    • Resolution: Not an Issue
    • Priority: P4
    • None
    • Affects Version/s: None
    • Component/s: tools
    • None

      This test case:

      public class Sample1 {
          final int x;

          Sample1() {
               for(;;x=1) {
                   x=2;
                   break;
               }
           }
      }

      is rejected by javac but should be accepted. See the discussion here [1]

      [1] http://mail.openjdk.java.net/pipermail/compiler-dev/2018-February/011646.html

            Assignee:
            Vicente Arturo Romero Zaldivar
            Reporter:
            Vicente Arturo Romero Zaldivar
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: