test262/test/language/expressions/class/syntax-invalid-grammar-field-def-has-initializer-no-sc-error.js
2018-08-20 16:38:53 -04:00

36 lines
738 B
JavaScript

// This file was procedurally generated from the following sources:
// - src/class-fields/grammar-field-def-has-initializer-no-sc-error.case
// - src/class-fields/syntax/invalid/cls-expr-fields-invalid-syntax.template
/*---
description: SyntaxError (class expression)
esid: prod-ClassElement
features: [class-fields-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ClassElement :
MethodDefinition
static MethodDefinition
FieldDefinition ;
;
FieldDefinition :
ClassElementName Initializer _opt
ClassElementName :
PropertyName
PrivateName
---*/
throw "Test262: This statement should not be evaluated.";
var C = class {
x = []
y;
};