- From: Sam Atkins <notifications@github.com>
- Date: Mon, 22 Aug 2022 02:48:19 -0700
- To: whatwg/webidl <webidl@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Monday, 22 August 2022 09:48:31 UTC
https://webidl.spec.whatwg.org/commit-snapshots/d720ef3ae3b683a70700c82160a8f66d7aa09bb3/#es-overloads
> Remove from S all entries whose type list is not of length argcount\.
This disagrees with the Note below the algorithm:
> After ignoring these trailing arguments, only overloads that can take this exact number of arguments are considered.
I believe the algorithm step should instead say to remove entries that cannot accept `argcount` arguments. Optional parameters mean that an entry could have a type list that is longer than `argcount` and still be considered, such as:
```webidl
interface Node : EventTarget {
// ...
Node getRootNode(optional GetRootNodeOptions options = {});
// ...
}
```
If `getRootNode()` is called with no arguments, this method would be removed from `S`, even though it should be considered, because `argcount` is 0 and the length of the type list here is 1.
--
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/webidl/issues/1183
You are receiving this because you are subscribed to this thread.
Message ID: <whatwg/webidl/issues/1183@github.com>
Received on Monday, 22 August 2022 09:48:31 UTC