Skip to content

Support regular and static operations with the same identifier in WebIDL #2270

Open
@lucacasonato

Description

@lucacasonato

See whatwg/webidl#1098

Currently when bikeshed encounters a regular and a static operation with the same name, a fatal error is raised:

FATAL ERROR: Multiple local 'method' <dfn>s for 'TextDecoder' have the same linking text 'decode(input, options)'.

A small reproduction is:

dictionary TextDecoderOptions {
  boolean fatal = false;
  boolean ignoreBOM = false;
};

dictionary TextDecoderOptionsWithLabel : TextDecoderOptions {
  DOMString label = "utf-8";
};

dictionary TextDecodeOptions {
  boolean stream = false;
};

[Exposed=*]
interface TextDecoder {
  constructor(optional DOMString label = "utf-8", optional TextDecoderOptions options = {});

  static USVString decode(optional [AllowShared] BufferSource input, optional TextDecoderOptionsWithLabel options = {});

  USVString decode(optional [AllowShared] BufferSource input, optional TextDecodeOptions options = {});
};

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