inheret -> inherit

This commit is contained in:
dragonwocky 2019-04-16 14:58:48 +10:00 committed by GitHub
parent c113522d5e
commit 52f899a1af
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -230,7 +230,7 @@ coffeeMachine.#waterLimit = 1000; // Error
coffeeMachine.waterAmount = 100; // Works coffeeMachine.waterAmount = 100; // Works
``` ```
On the language level, `#` is a special sign that the field is private. We can't access it from outside or from inhereting classes. On the language level, `#` is a special sign that the field is private. We can't access it from outside or from inheriting classes.
Private fields do not conflict with public ones. We can have both private `#waterAmount` and public `waterAmount` fields at the same time. Private fields do not conflict with public ones. We can have both private `#waterAmount` and public `waterAmount` fields at the same time.