Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"no-cross-overload" should not fire on static and regular operations with same identifier #672

Closed
tidoust opened this issue May 18, 2022 · 0 comments · Fixed by #673
Closed

Comments

@tidoust
Copy link
Member

tidoust commented May 18, 2022

Web IDL was recently updated to allow static operations to have the same name as regular operations, see whatwg/webidl#1097

The checker seems happy with that as long as these operations are defined in the same base definition. However, the checker reports a no-cross-overload error when the definitions are scattered across partials or mixins. For instance, the checker reports the error for the following IDL:

[Exposed=*]
interface Test {
  undefined operation();
};

partial interface Test {
  static undefined operation();
};

Since operations are not of the same kind (regular vs. static), they should not be considered as overloaded operations, and I think the preceding IDL is valid.

Real world example is the recent update to fetch to add a static Response.json operation: whatwg/fetch@b3bfd0c. In that case, the static operation is on the base mixin interface Body and the regular operation on Response. The Web IDL checker complains with the same "no-cross-overload" error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant