blob: 5feaba2a3c0a5c7d45d09e4b33c1fc5cf7d1af6f [file] [log] [blame]
// Copyright (C) 2018 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-method-definitions-static-semantics-early-errors
description: >
Throws an early SyntaxError if a method definition has a private name even
inside a class body. (generator)
info: |
Static Semantics: Early Errors
PropertyDefinition : MethodDefinition
It is a Syntax Error if PrivateBoundNames of MethodDefinition is non-empty.
negative:
phase: parse
type: SyntaxError
features: [class-methods-private, generators, class, class-fields-public]
---*/
$DONOTEVALUATE();
class C {
field = {
* #m() {}
}
}