blob: 771720da39ad16c719694c1c3526dd292f631f96 [file] [log] [blame]
// This file was procedurally generated from the following sources:
// - src/class-elements/grammar-private-field-optional-chaining.case
// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
/*---
description: PrivateName after '?.' is not valid syntax (class declaration)
esid: prod-ClassElement
features: [class-fields-private, optional-chaining, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Updated Productions
MemberExpression[Yield]:
MemberExpression[?Yield].PrivateName
---*/
$DONOTEVALUATE();
class C {
#m = 'test262';
access(obj) {
return obj?.#m;
}
}