docs refined

This commit is contained in:
Sergey Chernov 2026-01-04 22:50:49 +01:00
parent 11eadc1d9f
commit f5a3fbe9a3
2 changed files with 4 additions and 4 deletions

View File

@ -365,8 +365,8 @@ Example:
```lyng ```lyng
// Interface with state (id) and abstract requirements // Interface with state (id) and abstract requirements
interface Character(val id) { interface Character(val id) {
abstract var health var health
abstract var mana var mana
fun isAlive() = health > 0 fun isAlive() = health > 0
fun status() = name + " (#" + id + "): " + health + " HP, " + mana + " MP" fun status() = name + " (#" + id + "): " + health + " HP, " + mana + " MP"

View File

@ -698,8 +698,8 @@ class OOTest {
""" """
// Interface with state (id) and abstract requirements // Interface with state (id) and abstract requirements
interface Character(val id) { interface Character(val id) {
abstract var health var health
abstract var mana var mana
fun isAlive() = health > 0 fun isAlive() = health > 0
fun status() = name + " (#" + id + "): " + health + " HP, " + mana + " MP" fun status() = name + " (#" + id + "): " + health + " HP, " + mana + " MP"
// name is also abstractly required by the status method, // name is also abstractly required by the status method,