| 1 |
// This file was procedurally generated from the following sources: |
| 2 |
// - src/class-fields/init-err-contains-super.case |
| 3 |
// - src/class-fields/initializer-error/cls-expr-fields-equality.template |
| 4 |
/*--- |
| 5 |
description: Syntax error if `super()` used in class field (equality expression) |
| 6 |
esid: sec-class-definitions-static-semantics-early-errors |
| 7 |
features: [class, class-fields-public] |
| 8 |
flags: [generated] |
| 9 |
negative: |
| 10 |
phase: parse |
| 11 |
type: SyntaxError |
| 12 |
info: | |
| 13 |
Static Semantics: Early Errors |
| 14 |
|
| 15 |
FieldDefinition: |
| 16 |
PropertyNameInitializeropt |
| 17 |
|
| 18 |
- It is a Syntax Error if Initializer is present and Initializer Contains SuperCall is true. |
| 19 |
|
| 20 |
---*/ |
| 21 |
|
| 22 |
|
| 23 |
throw "Test262: This statement should not be evaluated."; |
| 24 |
|
| 25 |
var C = class { |
| 26 |
x = {} == super(); |
| 27 |
} |