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

Missing conversions on array index expression

    XMLWordPrintable

Details

    • b119
    • generic
    • generic
    • Verified

    Description

      An array with a single number element is not converted to an array index:

      var array = [1, 2];
      array[[0]]; // should return 1, it returns undefined

      A negative int array index is not converted to an array index either:

      var array = [];
      array[4294967294] = 1;
      array[-2]; // should return undefined, returns 1

      Attachments

        Activity

          People

            hannesw Hannes Wallnoefer
            jfdenise Jean-Francois Denise (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: