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

The Enumerable Issue when new Object

    Details

      Description

      A DESCRIPTION OF THE PROBLEM :
      #Testcase:
      var foo = function () {
      var obj = new Object("z");
      var p = obj.propertyIsEnumerable('0');
      print("Property '0' is Enumerable: " + p);
      };
      foo();

      #Command:
      ./nashorn/jdk-12.0.1/bin/jjs --language=es6 testcase.js

      #Output:
      Warning: The jjs tool is planned to be removed from a future JDK release
      Property '0' is Enumerable: false

      #Expected output:
      Warning: The jjs tool is planned to be removed from a future JDK release
      Property '0' is Enumerable: true

      #Description:
      According to ECMAScript-262, the value of p should be "true", but Nashorn outputs "false". Does Nashorn support the ECMAScript-262 standard in this case?


        Attachments

          Activity

            People

            • Assignee:
              hannesw Hannes Wallnoefer
              Reporter:
              webbuggrp Webbug Group
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: