Skip to content

Type association restrictions for extended attributes break with unions #827

Open
@bzbarsky

Description

@bzbarsky

Consider IDL that says:

  void foo([AllowShared] BufferSource);

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 #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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions