| Summary: | [ES6] Class parser does not allow methods named set and get. | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Oliver Hunt <oliver> | ||||
| Component: | JavaScriptCore | Assignee: | Ryosuke Niwa <rniwa> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | benjamin, fpizlo, ggaren, rniwa, saam | ||||
| Priority: | P2 | ||||||
| Version: | 528+ (Nightly build) | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Bug Depends on: | |||||||
| Bug Blocks: | 140491 | ||||||
| Attachments: |
|
||||||
Created attachment 258344 [details]
Fixes the bug
Comment on attachment 258344 [details]
Fixes the bug
How hard would it be to factor out the property name parsing? Parsepropertyname()->{name, propertytype}
R+ as is, but if so a follow up to refactor would be nice
Yup, I'm gonna try that refactoring after fixing the bug 144281. (In reply to comment #3) > Yup, I'm gonna try that refactoring after fixing the bug 144281. I meant to say the bug 142690. Committed r188018: <http://trac.webkit.org/changeset/188018> |
class Foo { set() {} }; and class Bar { get() {} } should both be valid method names, and yet are being rejected. The parser needs to check for a ( after the get/set pseudo-keywords rather than assuming it's always a setter or getter.