[heycam/webidl] Conversion for (SomeDictionary or sequence<T>) seems incorrect (#123)

A dictionary and a sequence<T> are [distinguishable](https://heycam.github.io/webidl/#dfn-distinguishable) so `(SomeDictionary or sequence<DOMString>)` should be a valid union type when `SomeDictionary` is a dictionary. When an implementation follows [the conversion algorithm](https://heycam.github.io/webidl/#es-union) to convert an ECMAScript array to the union type, step 11 will be executed and the conversion would result in `SomeDictionary`. I think this is incorrect. Instead, step 12 should be executed so that the array is converted to `sequence<DOMString>`.

We encounter this bug while implementing WebRTC in Blink. [Here](https://codereview.chromium.org/1977513004/) is the specific change.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/heycam/webidl/issues/123

Received on Thursday, 19 May 2016 08:11:45 UTC