Re: Question about diamond-shaped patterns formed by "implements"

Boris Zbarsky:
> Consider these two testcases:
>
>    interface A { attribute long foo; };
>    interface B {};
>    interface C {};
>    interface D {};
>    D implements B;
>    D implements C;
>    B implements A;
>    C implements A;
>
> and
>
>    interface A { attribute long foo; } ;
>    interface B : A {};
>    interface C : A {};
>    interface D {};
>    D implements B;
>    D implements C;
>
> Are these legal WebIDL?

They both are.

> http://dev.w3.org/2006/webapi/WebIDL/#dfn-consequential-interfaces is
> unclear whether "consequential interfaces" is a list or a set.  In the
> former case, you get two copies of "foo" on D via the two different
> paths, and the constructs are invalid.  In the latter case, there is
> only one copy of A inolved and the constructs are valid...

It should be a set.  All of the members from consequential interfaces 
should be unioned together and become properties on the LHS interface's 
prototype object.

> In either case, the spec should probably be clarified (possibly
> including an example).

OK.

Received on Thursday, 7 June 2012 05:44:24 UTC