[parser] Disallow duplicate and undeclared private names (#10456)

* [parser] Add private names tracking to Scope

- Disallow duplicate private names
- Disallow undeclared private names

* Update tests

* Test all possible duplications

* Test undeclared private names

* Better error message for top-level private names

* Fix flow

* Update test262 whitelist

* Update fixtures

* Update flow whitelist

* Remove old output.json

* Move ClassScopeHandler to a separate class

* Make the code readable
This commit is contained in:
Nicolò Ribaudo
2020-01-10 02:22:05 +01:00
committed by GitHub
parent 9f148a1603
commit 771c730fda
223 changed files with 16948 additions and 259 deletions

View File

@@ -14,10 +14,4 @@ export_import_reserved_words/migrated_0003.js
export_statements/export_trailing_comma.js
nullish_coalescing/precedence_and.js
nullish_coalescing/precedence_or.js
private_class_properties/getter_and_field.js
private_class_properties/getter_duplicate.js
private_class_properties/multiple.js
private_class_properties/multiple.js
private_class_properties/setter_and_field.js
private_class_properties/setter_duplicate.js
types/member/reserved_words.js