Re: Nullable union types containing other nullable types

On 4/13/12 11:43 PM, Cameron McCormack wrote:
 > No, in #idl-nullable-type it says:

Ah, indeed.  Excellent.

Can't wait till we have some automated tests for this in our parser.... ;)

> The only reason we *might* like to allow this is if you had a typedef
> for some type that was nullable:
>
> typedef sequence<long>? Numbers;
> typedef sequence<DOMString>? Letters;
>
> which meant that you couldn't write for example
>
> void f((Numbers or Letters) x);

That's a different situation, actually.  That's two nullable types in a 
single union, which is pretty explicitly disallowed because they're not 
distinguishable.

-Boris

Received on Saturday, 14 April 2012 03:49:54 UTC