W3C home > Mailing lists > Public > public-script-coord@w3.org > April to June 2014

[Bug 25630] "The following use of overloading however is inv..."

From: <bugzilla@jessica.w3.org>
Date: Mon, 12 May 2014 09:19:22 +0000
To: public-script-coord@w3.org
Message-ID: <bug-25630-3890-kd1egrO5zn@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=25630

--- Comment #2 from Nils Barth <nbarth+w3bugzilla@google.com> ---
AFAICT, String vs. Number is handled in the overload resolution algorithm
(nutshell: if argument is a Number, resolve to numeric if possible;
otherwise use ToString if possible,
otherwise use ToNumber if possible)
http://heycam.github.io/webidl/#dfn-overload-resolution-algorithm

In detail:
10. Otherwise: if V is a Number value, and there is an entry in S that has one
of the following types at position i of its type list,
• a numeric type
...

11. Otherwise: if there is an entry in S that has one of the following types at
position i of its type list,
• DOMString
...

12. Otherwise: if there is an entry in S that has one of the following types at
position i of its type list,
• a numeric type
...

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Received on Monday, 12 May 2014 09:19:26 UTC

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