mirror of
https://github.com/tc39/test262.git
synced 2025-07-19 20:14:56 +02:00
30 lines
651 B
JavaScript
30 lines
651 B
JavaScript
// 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;
|
|
}
|
|
}
|