Skip to content

Validate unique dictionary members (including inheritance) #580

Open
@foolip

Description

@foolip

https://heycam.github.io/webidl/#idl-dictionaries says:

The identifier of a dictionary member must not be the same as that of another dictionary member defined on the dictionary or on that dictionary’s inherited dictionaries.

I tried if webidl2.js would catch such errors but it seems like not:

const { parse, validate } = require("webidl2");
const ast = parse(`dictionary A { any m; }; dictionary B : A { object m; };`);
const validations = validate(ast); // returns []

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions