W3C home > Mailing lists > Public > public-script-coord@w3.org > January to March 2013

[Bug 21295] overload resolution: are DOMString and sequence<T> distinguishable now?

From: <bugzilla@jessica.w3.org>
Date: Fri, 15 Mar 2013 01:13:40 +0000
To: public-script-coord@w3.org
Message-ID: <bug-21295-3890-hkIue0EYcP@http.www.w3.org/Bugs/Public/>

Boris Zbarsky <bzbarsky@mit.edu> changed:

           What    |Removed                     |Added
                 CC|                            |bzbarsky@mit.edu

--- Comment #1 from Boris Zbarsky <bzbarsky@mit.edu> ---
DOMString and sequence are distinguishable, yes.

As for how you decide which overload is being called, that's described at

In this case, step 13 is reached with i == 0.  The substeps of step 13 are
followed, you skip step 7 because V is not an object, and then step 8 treats it
as a DOMString.

That's assuming what's passed in is a primitive string.  If a JS String object
is passed in, it will in fact be treated as a sequence the way the spec is
currently written, as far as I can tell.  That might be worth fixing....

You are receiving this mail because:
You are on the CC list for the bug.
Received on Friday, 15 March 2013 01:13:44 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:08 UTC