Bug 144254

Summary: Class syntax should allow string and numeric identifiers for method names
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: JavaScriptCoreAssignee: Ryosuke Niwa <rniwa>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, darin, fpizlo, ggaren, joepeck
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 140491    
Attachments:
Description Flags
Fixes the bug darin: review+

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>