tc39/proposal-explicit-resource-management

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

patrick-soquet opened this issue · 3 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.