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

Object.create(Array.prototype) doesn't respect reset length

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 8
    • None
    • core-libs
    • None
    • b82
    • Verified

       var a = Object.create(Array.prototype);
        a.length=4;
        print(a.length);

      Nashorn says length is 0, v8/firefox say it's 4; from a quick look at ES5 I tend to agree with the latter.

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

              Created:
              Updated:
              Resolved: