Bug 144254 - Class syntax should allow string and numeric identifiers for method names
Summary: Class syntax should allow string and numeric identifiers for method names
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ryosuke Niwa
URL:
Keywords:
Depends on:
Blocks: 140491
  Show dependency treegraph
 
Reported: 2015-04-27 02:12 PDT by Ryosuke Niwa
Modified: 2015-05-01 19:24 PDT (History)
5 users (show)

See Also:


Attachments
Fixes the bug (28.09 KB, patch)
2015-04-27 02:22 PDT, Ryosuke Niwa
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2015-04-27 02:12:42 PDT
class syntax allows numeric and string identifiers for both instance and static methods.
Comment 1 Ryosuke Niwa 2015-04-27 02:22:52 PDT
Created attachment 251730 [details]
Fixes the bug
Comment 2 Ryosuke Niwa 2015-04-27 02:24:03 PDT
Comment on attachment 251730 [details]
Fixes the bug

View in context: https://bugs.webkit.org/attachment.cgi?id=251730&action=review

> LayoutTests/js/class-syntax-string-and-numeric-names-expected.txt:32
> +FAIL setterValue = 0; X = class { set 2(x) { setterValue = x; } }; (new X)[2] = 22; setterValue should be 22. Was 0.
> +FAIL X[2] = 23; setterValue should be 22. Was 0.

These failures are caused by webkit.org/b/144252 as commented in the test.

> LayoutTests/js/class-syntax-string-and-numeric-names-expected.txt:38
> +FAIL setterValue = 0; X = class { get 5() { } set 5(x) { setterValue = x; } }; (new X)[5] = 25; setterValue should be 25. Was 0.
> +FAIL X[5] = 26; setterValue should be 25. Was 0.

Ditto.
Comment 3 Ryosuke Niwa 2015-05-01 19:24:15 PDT
Committed r183709: <http://trac.webkit.org/changeset/183709>