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

Improve restrictions on attributes/operations when maplike/setlike are used #49

Open
bzbarsky opened this issue Apr 17, 2015 · 3 comments · May be fixed by #726
Open

Improve restrictions on attributes/operations when maplike/setlike are used #49

bzbarsky opened this issue Apr 17, 2015 · 3 comments · May be fixed by #726
Labels
☕☕☕ difficulty:hard Excruciating ⌛⌛ duration:medium Shouldn't be too long to fix

Comments

@bzbarsky
Copy link
Collaborator

Two changes:

  1. Use of maplike/setlike should not affect static attributes/operations (but should affect constants, as it does now, since those go on the proto too).

  2. The mutator methods (clear, add, set, delete) should not be allowed to shadow a method on an inherited interface. But having them on the interface itself or its consequential interfaces should be OK (as now) and just inhibit autogeneration of the method.

@domenic
Copy link
Member

domenic commented Apr 17, 2015

I don't quite understand 1)?

@bzbarsky
Copy link
Collaborator Author

Consider this IDL:

interface Foo {
  static boolean has();
  setlike<long>;
};

Per current spec this would be disallowed. The proposal is that it be allowed. The setlike declaration will create a method called has on Foo.prototype, and the static thing will create a method called has on Foo, but there's no conflict there, so no reason to forbid this IDL.

@domenic
Copy link
Member

domenic commented Apr 17, 2015

Got it! SGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
☕☕☕ difficulty:hard Excruciating ⌛⌛ duration:medium Shouldn't be too long to fix
Development

Successfully merging a pull request may close this issue.

3 participants