Fix extending of class (#1363)

Fix extending of class
This commit is contained in:
Alexey Pyltsyn 2019-09-19 19:54:53 +03:00 committed by GitHub
commit f80dc03d87
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -248,7 +248,7 @@ Unlike protected ones, private fields are enforced by the language itself. That'
But if we inherit from `CoffeeMachine`, then we'll have no direct access to `#waterAmount`. We'll need to rely on `waterAmount` getter/setter:
```js
class MegaCoffeeMachine extends CoffeeMachine() {
class MegaCoffeeMachine extends CoffeeMachine {
method() {
*!*
alert( this.#waterAmount ); // Error: can only access from CoffeeMachine