- From: <bugzilla@jessica.w3.org>
- Date: Thu, 14 Mar 2013 23:53:25 +0000
- To: public-script-coord@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=21295 Bug ID: 21295 Summary: overload resolution: are DOMString and sequence<T> distinguishable now? Classification: Unclassified Product: WebAppsWG Version: unspecified Hardware: PC OS: Windows NT Status: NEW Severity: normal Priority: P2 Component: WebIDL Assignee: cam@mcc.id.au Reporter: travil@microsoft.com QA Contact: public-webapps-bugzilla@w3.org CC: mike@w3.org, public-script-coord@w3.org In the Screen Orientation spec: http://www.w3.org/TR/screen-orientation/#extensions-to-the-screen-interface the interface specifies an overload between a sequence<DOMString> and a DOMString: boolean lockOrientation (DOMString orientation); boolean lockOrientation (sequence<DOMString> orientations); So, when an implementation gets a DOMString as a parameter, I wondered how I could tell whether I should apply the sequence<> conversion logic, or take the DOMString as-is? The sequence<T> conversion logic would seem to take a DOMString "Hi", and per section 4.2.24: http://dev.w3.org/2006/webapi/WebIDL/#es-sequence I'd fall through to the "Any kind of object except for a native Date object or a native RegExp object" rule. DOMString's have a length (2 in this case), so I'd end up either taking the DOMString as is (one viable outcome) or converting the DOMString into ["H", "i"] per 4.2.24 (equally valid outcome). I think that means that these two types are not distinguishable anymore? Somehow I don't think that's the intent... -- You are receiving this mail because: You are on the CC list for the bug.
Received on Thursday, 14 March 2013 23:53:28 UTC