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

let & const: remaining issues with lexical scoping

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 8u40
    • 8u40
    • core-libs
    • None
    • b17
    • generic
    • generic

    Backports

      Description

        There are a few remaining issues with let/const after JDK-8051889:

         - let/const declarations should not be allowed in raw switch statements where the case clause does not have a block with explicit curly braces.
         - let/const should not be allowed in other unprotected statements such as if or while statements without explicit curly braces for the body of the statement.
         - for statement with let/const initializer should copy defined symbols from the outer to the inner block on each iteration (see http://esdiscuss.org/topic/in-es6-do-for-loops-with-a-let-const-initializer-create-a-separate-scope)

        Attachments

          Issue Links

            Activity

              People

                hannesw Hannes Wallnoefer
                hannesw Hannes Wallnoefer
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: