2017-10-26 23:58:33 +02:00
|
|
|
// Copyright (C) 2017 Valerie Young. All rights reserved.
|
|
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
/*---
|
|
|
|
esid: sec-module-semantics-static-semantics-early-errors
|
|
|
|
description: Early error when referencing privatename in field without being declared in class fields
|
|
|
|
info: |
|
|
|
|
Static Semantics: Early Errors
|
|
|
|
Module : ModuleBody
|
|
|
|
It is a Syntax Error if AllPrivateNamesValid of ModuleBody with an empty List as an argument is false.
|
2017-11-28 18:59:27 +01:00
|
|
|
features: [class, class-fields-private, class-fields-public]
|
2017-10-26 23:58:33 +02:00
|
|
|
flags: [module]
|
|
|
|
negative:
|
2017-12-03 06:06:42 +01:00
|
|
|
phase: parse
|
2017-10-26 23:58:33 +02:00
|
|
|
type: SyntaxError
|
|
|
|
---*/
|
|
|
|
|
2018-10-11 16:59:24 +02:00
|
|
|
$DONOTEVALUATE();
|
2017-10-26 23:58:33 +02:00
|
|
|
|
|
|
|
class C {
|
|
|
|
y = this.#x;
|
|
|
|
}
|