Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8019398 nashorn-dev spec corner, review bugs
  3. JDK-8019508

Comma handling in object literal parsing is wrong

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Fixed
    • Icon: P4 P4
    • 8
    • None
    • core-libs
    • None
    • b98
    • generic
    • generic
    • Verified


      jjs> ({,})
      [object Object]
      jjs> ({,a:0})
      [object Object]
      jjs> ({a:0,,})
      [object Object]

      All these should throw SyntaxError exceptions. Only trailing comma is permitted as per specification.

            sundar Sundararajan Athijegannathan
            sundar Sundararajan Athijegannathan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: