W3C home > Mailing lists > Public > public-script-coord@w3.org > April to June 2012

Question about diamond-shaped patterns formed by "implements"

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Wed, 06 Jun 2012 18:02:40 -0400
Message-ID: <4FCFD380.2090607@mit.edu>
To: public-script-coord@w3.org
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? 
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...

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

-Boris
Received on Wednesday, 6 June 2012 22:03:09 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 May 2013 19:30:06 UTC