archives

« Bugzilla Issues Index

#3110 — SetConstructor


http://people.mozilla.org/~jorendorff/es6-draft.html#sec-weakset-iterable

7. Else,
7.a. Let iter be the result of GetIterator(iterable).
7.b. ReturnIfAbrupt(iter).
7.c. Let adder be the result of Get(set, "add").
7.d. ReturnIfAbrupt(adder).
7.e. If IsCallable(adder) is false, throw a TypeError Exception.
7.f. Let iter be the result of GetIterator(ToObject(iterable)).
7.g. ReturnIfAbrupt(iter).

7.a+7.b is pretty much the same as 7.f+7.g

I assume the intention is:

7. Else,
7.a. Let adder be the result of Get(set, "add").
7.b. ReturnIfAbrupt(adder).
7.c. If IsCallable(adder) is false, throw a TypeError Exception.
7.d. Let iter be the result of GetIterator(ToObject(iterable)).
7.e. ReturnIfAbrupt(iter).

In other words remove 7a and 7b and keep the ToObject in 7d


fixed in rev27 editor's draft

(this is actually a duplicate)


Dupe of which bug?

What was the outcome?


fixed in rev27 draft