Re: [heycam/webidl] Does `TreatNullAs` apply to `DOMString` inside a union type? (#441)

Basically what @tobie said. One additional point:

> But `TreatNullAs` doesn't say one way or the other whether it makes the underlying DOMString nullable.

No, it does not. In fact, everything will fall back to the `DOMString` member type, which is what we want here.

But you did raise an interesting question: the union conversion algorithm only really talks about annotated types in the [flattened member types](https://heycam.github.io/webidl/#dfn-flattened-union-member-types) algorithm, which just throws away any annotations on the member types of a union type. This means that, technically as of now, `([TreatNullAs=EmptyString] DOMString or SomeObjectType)` is equivalent to `(DOMString or SomeObjectType)` as far as ES-to-IDL conversion is concerned. This does not seem right.

-- 
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/441#issuecomment-330483591

Received on Tuesday, 19 September 2017 09:30:03 UTC