[heycam/webidl] Type association restrictions for extended attributes break with unions (#827)

Consider IDL that says:
```
  void foo([AllowShared] ArrayBufferView);
```
Per spec as written right now, this is invalid, because https://heycam.github.io/webidl/#AllowShared says:

> A type that is not a buffer source type must not be associated with the [AllowShared] extended attribute.

and `ArrayBufferView` is in fact not a buffer source type.   The rules in https://heycam.github.io/webidl/#idl-type-extended-attribute-associated-with propate the extended attribute to all the things in the union (ignoring for the moment the typedef complications), but don't remove the currently-invalid association with the outer union type...

We should really fix both this and https://github.com/heycam/webidl/issues/670, presumably, but it's not clear to me what the goals of these restrictions really were and hence how they should be loosened while preserving those goals.

@domenic @annevk

-- 
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/827

Received on Thursday, 12 December 2019 17:15:23 UTC