test: cover compatibility method field checks

This commit is contained in:
Hermes Agent
2026-09-13 21:16:52 +00:00
parent d4d32f8f07
commit 762c6506ce
8 changed files with 36 additions and 4 deletions
+1 -1
View File
@@ -347,7 +347,7 @@ Object player is not known yet. Create it with NEW ClassName player before setti
The checker also names typed method-body field checks and assignments. Inside `Player.rename`, `CHECK TYPE name IS NUMBER` reports `Type check failed in Player.rename: expected NUMBER, but name looks like TEXT.` Inside `Player.rename`, `SET name 123` reports `Type mismatch for field name in Player.rename: expected TEXT, but this value looks like NUMBER.` Inside `Player.add RETURNS NUMBER`, `SET score score + name` reports `Type mismatch for field score in Player.add: addition needs NUMBER values, but name looks like TEXT.` so the learner sees that the field belongs to the current class method, not an unrelated variable.
The release validator also runs the modern and compatibility method-body field diagnostic fixtures, so these learner-facing errors remain part of `claro validate`, not only the standalone typecheck diagnostic script.
The release validator also runs the modern and compatibility method-body field diagnostic fixtures, including `CHECK TYPE` checks in older `TAKES` / `LEARNED` methods, so these learner-facing errors remain part of `claro validate`, not only the standalone typecheck diagnostic script.
## Project and package workflow