| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 'use strict'; | 5 'use strict'; |
| 6 | 6 |
| 7 // Flags: --harmony-computed-property-names | |
| 8 | |
| 9 | 7 |
| 10 function ID(x) { | 8 function ID(x) { |
| 11 return x; | 9 return x; |
| 12 } | 10 } |
| 13 | 11 |
| 14 | 12 |
| 15 (function TestClassMethodString() { | 13 (function TestClassMethodString() { |
| 16 class C { | 14 class C { |
| 17 a() { return 'A'} | 15 a() { return 'A'} |
| 18 ['b']() { return 'B'; } | 16 ['b']() { return 'B'; } |
| (...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 454 class C { | 452 class C { |
| 455 get [C]() { return 42; } | 453 get [C]() { return 42; } |
| 456 } | 454 } |
| 457 }, ReferenceError); | 455 }, ReferenceError); |
| 458 assertThrows(function() { | 456 assertThrows(function() { |
| 459 class C { | 457 class C { |
| 460 set [C](_) { } | 458 set [C](_) { } |
| 461 } | 459 } |
| 462 }, ReferenceError); | 460 }, ReferenceError); |
| 463 })(); | 461 })(); |
| OLD | NEW |