Add tests/36_object_methods.claro from Claro v1.17.26 zip

This commit is contained in:
RayPals
2026-06-01 00:52:17 +02:00
parent 16a15d514e
commit e49c26d3e0
+25
View File
@@ -0,0 +1,25 @@
CLASS Player
HAS name TEXT
HAS score NUMBER
TEACH show
SAY name
SAY score
END
TEACH add points
SET score score + points
END
END
NEW Player player
SET player.name "Jon"
SET player.score 10
DO player.show
DO player.add 5
SAY player.score
OBJECT CLASS player AS kind
SAY kind
OBJECT FIELDS player AS fields
COUNT fields AS total
SAY total