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

TypedArrays should implement ES6 iterator protocol

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • None
    • core-libs
    • None
    • b142
    • generic
    • generic

      Our implementation of TypedArrays implements the original specification [1] which has been superseded by the ECMAScript 6 specification. ES6 does specify that the TypedArray prototype has a @@iterator function in order to work with the ES6 iterator protocol and for-of loops [2].

      [1] https://www.khronos.org/registry/typedarray/specs/latest/
      [2] http://www.ecma-international.org/ecma-262/6.0/#sec-%typedarray%.prototype-@@iterator

      Even though we do not fully support ES6 version of TypedArrays, we should implement the @@iterator function in order to make TypedArrays work with Iterators and for-of.

            hannesw Hannes Wallnoefer
            hannesw Hannes Wallnoefer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: