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

16.1.8: DU/DA in a switch expression

    Details

      Description

      There is a typo in the spec from section "16.1.8. switch Expression" (http://cr.openjdk.java.net/~gbierman/switch-expressions.html#jep325-16.1.8).

      The following rule:

      - V is definitely unassigned after a switch expression iff for every value break statement with expression e in the switch block that may exit the switch expression, V is definitely unassigned before the value breakstatement and V is *****definitely assigned***** after e.

      It should read as:

      - V is definitely unassigned after a switch expression iff for every value break statement with expression e in the switch block that may exit the switch expression, V is definitely unassigned before the value breakstatement and V is *****definitely unassigned***** after e.


      As, if V is assigned after e, V will be assigned after switch expression.

        Attachments

          Activity

            People

            • Assignee:
              gbierman Gavin Bierman
              Reporter:
              rchandra Ravi Chandra
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: