tc39 / proposal-explicit-resource-management

ECMAScript Explicit Resource Management

Home Page:https://arai-a.github.io/ecma262-compare/?pr=3000

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

test262/test/built-ins/AsyncIteratorPrototype/Symbol.asyncDispose/return-val.js

patrick-soquet opened this issue · comments

I am not sure I have to ask that here. But is this test correct?

%AsyncIteratorPrototype% does not have a "return" method so the result of %AsyncIteratorPrototype% [ @@asyncDispose ] ( ) is undefined. Maybe I am missing something?

Except for this one, my internal version of XS now passes all tests you provided. Thank you much!

An %AsyncIteratorPrototype% does not itself have a return, but an async generator function will produce an async iterator that does have a return. Per %AsyncIteratorPrototype% [ @@asyncDispose ] (), the asyncDispose method should always return a Promise.

The steps in the comment header for that test are incorrect though, a copy-paste error on my part.

Thank you for the clarification.