blob: 94b85712b7465a07e1fd76f5166909042335a13d [file] [edit]
// Copyright (C) 2018 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
path: language/statements/class/elements/syntax/early-errors/invalid-names/method-
name: >
Invalid private names should throw a SyntaxError,
method in class declaration
features: [class]
esid: sec-static-semantics-early-errors
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
negative:
phase: parse
type: SyntaxError
---*/
$DONOTEVALUATE();
class C {
m() { /*{ body }*/ }
}