typecheck: validate CALL object method args

This commit is contained in:
Hermes Agent
2026-09-01 19:32:22 +00:00
parent 6edbd587bc
commit 8237792cc3
6 changed files with 30 additions and 3 deletions
+11
View File
@@ -0,0 +1,11 @@
CLASS Player
HAS score NUMBER
TEACH add points
CHECK TYPE points IS NUMBER
SET score score + points
END
END
NEW Player player
CALL player.add WITH "five"
+11
View File
@@ -0,0 +1,11 @@
CLASS Player
HAS score NUMBER
TEACH add points
CHECK TYPE points IS NUMBER
SET score score + points
END
END
NEW Player player
CALL player.add WITH 5