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

https://www.w3.org/Bugs/Public/show_bug.cgi?id=21295

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
http://dev.w3.org/2006/webapi/WebIDL/#dfn-overload-resolution-algorithm

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 the QA Contact for the bug.

Received on Friday, 15 March 2013 01:13:45 UTC