diff --git a/docs/OOP.md b/docs/OOP.md index f15d14f..8a8ef12 100644 --- a/docs/OOP.md +++ b/docs/OOP.md @@ -365,8 +365,8 @@ Example: ```lyng // Interface with state (id) and abstract requirements interface Character(val id) { - abstract var health - abstract var mana + var health + var mana fun isAlive() = health > 0 fun status() = name + " (#" + id + "): " + health + " HP, " + mana + " MP" diff --git a/lynglib/src/commonTest/kotlin/OOTest.kt b/lynglib/src/commonTest/kotlin/OOTest.kt index 516b371..bea93fe 100644 --- a/lynglib/src/commonTest/kotlin/OOTest.kt +++ b/lynglib/src/commonTest/kotlin/OOTest.kt @@ -698,8 +698,8 @@ class OOTest { """ // Interface with state (id) and abstract requirements interface Character(val id) { - abstract var health - abstract var mana + var health + var mana fun isAlive() = health > 0 fun status() = name + " (#" + id + "): " + health + " HP, " + mana + " MP" // name is also abstractly required by the status method,