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

Parsing issue with automatic semicolon insertion

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b119
    • CPU:
      generic
    • OS:
      generic

      Backports

        Description

        This issue was reported in nashorn-dev alias. See http://mail.openjdk.java.net/pipermail/nashorn-dev/2016-May/006125.html

        Simplified test case is as follows:

        File: t.js

        v = function() {
        }

        /**/ function f() {
        }

        With both 8u and latest jdk9-dev, we get

        t.js:4:5 Expected ; but found function
        /**/ function f() {
             ^
        t.js:5:0 Expected eof but found }
        }
        ^

          Activity

          Hide
          hannesw Hannes Wallnoefer added a comment -
          The comment "hides" the newline and prevents automatic semicolon insertion.
          Show
          hannesw Hannes Wallnoefer added a comment - The comment "hides" the newline and prevents automatic semicolon insertion.
          Hide
          hgupdate HG Updates added a comment -
          URL: http://hg.openjdk.java.net/jdk9/dev/nashorn/rev/621ad507bf9b
          User: hannesw
          Date: 2016-05-13 16:38:43 +0000
          Show
          hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/dev/nashorn/rev/621ad507bf9b User: hannesw Date: 2016-05-13 16:38:43 +0000
          Hide
          hgupdate HG Updates added a comment -
          URL: http://hg.openjdk.java.net/jdk9/jdk9/nashorn/rev/621ad507bf9b
          User: lana
          Date: 2016-05-18 20:42:21 +0000
          Show
          hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/jdk9/nashorn/rev/621ad507bf9b User: lana Date: 2016-05-18 20:42:21 +0000

            People

            • Assignee:
              hannesw Hannes Wallnoefer
              Reporter:
              sundar Sundararajan Athijegannathan
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: