WebIDL overload resolution, arrays and Nullable

2012-06-29 Thread Joshua Bell
Over in WebKit-land there's some disagreement about WebIDL method overload resolution, specifically around passing null, arrays (T[]) and the concept of Nullable. Here's an example where we're just not sure what the WebIDL spec dictates: void f(float[] x); // overload A void f(DOMString x); //

Re: WebIDL overload resolution, arrays and Nullable

2012-06-29 Thread Kyle Huey
On Fri, Jun 29, 2012 at 9:25 AM, Joshua Bell jsb...@chromium.org wrote: Over in WebKit-land there's some disagreement about WebIDL method overload resolution, specifically around passing null, arrays (T[]) and the concept of Nullable. Here's an example where we're just not sure what the

Re: WebIDL overload resolution, arrays and Nullable

2012-06-29 Thread Boris Zbarsky
On 6/29/12 12:25 PM, Joshua Bell wrote: void f(float[] x); // overload A void f(DOMString x); // overload B WebIDL itself, of course, doesn't dictate how matching and dispatching should be implemented Actually, it does. http://dev.w3.org/2006/webapi/WebIDL/#dfn-overload-resolution-algorithm

Re: WebIDL overload resolution, arrays and Nullable

2012-06-29 Thread Kyle Huey
On Fri, Jun 29, 2012 at 9:51 AM, Boris Zbarsky bzbar...@mit.edu wrote: On 6/29/12 12:37 PM, Kyle Huey wrote: #5. Neither T[] nor DOMString admits null as a value. DOMString does not admit null as an IDL value. Which means that ES null is stringified when converting to DOMString. -Boris

Re: WebIDL overload resolution, arrays and Nullable

2012-06-29 Thread Joshua Bell
On Fri, Jun 29, 2012 at 9:50 AM, Boris Zbarsky bzbar...@mit.edu wrote: On 6/29/12 12:25 PM, Joshua Bell wrote: void f(float[] x); // overload A void f(DOMString x); // overload B WebIDL itself, of course, doesn't dictate how matching and dispatching should be implemented Actually, it