https://tc39.es/ecma262/#sec-runtime-semantics-forin-div-ofheadevaluation-tdznames-expr-iterationkind
Steps 7.a-b. say:
a. Assert: iterationKind is iterate.
b. If iterationKind is async-iterate, let iteratorHint be async.
The assertion rules out the condition on the next line.
The implication is that the assertion should have been removed in #1066.
or else changed to: Assert: _iterationKind_ is ~iterate~ or ~async-iterate~.
Good call, that seems better.
Or changed to:
- If iterationKind is ~async-iterate~, then let iteratorHint be ~async~.
- Else,
- Assert: iterationKind is ~iterate~.
- Let iteratorHint be ~sync~.
1. If _iterationKind_ is ~async-iterate~, then let _iteratorHint_ be ~async~.
1. Else,
1. Assert: _iterationKind_ is ~iterate~.
1. Let _iteratorHint_ be ~sync~.
This is used in ValidateAndApplyPropertyDescriptor 搂 Step 2.d.
Most helpful comment
or else changed to:
Assert: _iterationKind_ is ~iterate~ or ~async-iterate~.