cc rezvan

On Wed, Apr 23, 2025 at 5:44 PM ClearScript Developers <
clearscript...@gmail.com> wrote:

> Hello!
>
> Consider the following:
>
> async function foo() {
>     await using x = { [Symbol.asyncDispose]: 0, [Symbol.dispose]: () => {}
> };
> }
> await foo();
>
> This throws "TypeError: Symbol(Symbol.asyncDispose) is not a function".
>
> Is that a bug? According to our reading of the proposal
> <https://github.com/tc39/proposal-explicit-resource-management>, the
> synchronous fallback should be used if [Symbol.asyncDispose] exists but
> isn't a function. From the proposal:
>
> let $$dispose = x[Symbol.asyncDispose];
> if (typeof $$dispose !== "function") {
>   $$dispose = x[Symbol.dispose];
> }
>
> Thanks!
>
> --
> --
> v8-dev mailing list
> v8-dev@googlegroups.com
> http://groups.google.com/group/v8-dev
> ---
> You received this message because you are subscribed to the Google Groups
> "v8-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to v8-dev+unsubscr...@googlegroups.com.
> To view this discussion visit
> https://groups.google.com/d/msgid/v8-dev/41a93f7b-1ea5-49f7-b0d1-87445a3e2493n%40googlegroups.com
> <https://groups.google.com/d/msgid/v8-dev/41a93f7b-1ea5-49f7-b0d1-87445a3e2493n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 


Google Germany GmbH

Erika-Mann-Straße 33

80636 München

Geschäftsführer: Paul Manicle, Liana Sebastian.

Registergericht und -nummer: Hamburg, HRB 86891

Sitz der Gesellschaft: Hamburg

Diese E-Mail ist vertraulich. Falls sie diese fälschlicherweise erhalten
haben sollten, leiten Sie diese bitte nicht an jemand anderes weiter,
löschen Sie alle Kopien und Anhänge davon und lassen Sie mich bitte wissen,
dass die E-Mail an die falsche Person gesendet wurde.



This e-mail is confidential. If you received this communication by mistake,
please don't forward it to anyone else, please erase all copies and
attachments, and please let me know that it has gone to the wrong person.

-- 
-- 
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
--- 
You received this message because you are subscribed to the Google Groups 
"v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-dev+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/v8-dev/CAED6dUC0mCBt1Ld-XOpCgQ0rWPGukxO8iCtuHyWCtoHn5S0-xA%40mail.gmail.com.

Reply via email to