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
[email protected]
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 [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/v8-dev/41a93f7b-1ea5-49f7-b0d1-87445a3e2493n%40googlegroups.com.