test: add object field CHECK TYPE NUMBER negative fixture

This commit is contained in:
Hermes Agent
2026-06-30 03:07:07 -06:00
parent 66816f26d1
commit ca7c3b51ca
8 changed files with 20 additions and 5 deletions
+1 -1
View File
@@ -53,7 +53,7 @@ Ready now:
- `TYPE OF` and `CHECK TYPE`
- typed list/map checks through `claro typecheck`
- a narrow function/method argument check: `CHECK TYPE parameter IS TYPE` inside a function or simple object method lets `claro typecheck` accept correct checked calls and catch mismatched `DO`, `CALL ... WITH`, and `DO object.method ...` arguments
- a narrow object-field assignment check for simple `NEW Class object` plus direct `SET object.field value` cases when the class declares `HAS field TYPE`; validation now covers correct NUMBER, TEXT, and YESNO direct assignments, direct `CHECK TYPE` metadata acceptance for TEXT/YESNO fields, negative TEXT and YESNO field `CHECK TYPE` metadata mismatches, NUMBER/TEXT/YESNO wrong-type diagnostics, plus NUMBER/TEXT/YESNO-valued unknown-field diagnostics for direct assignments to undeclared fields
- a narrow object-field assignment check for simple `NEW Class object` plus direct `SET object.field value` cases when the class declares `HAS field TYPE`; validation now covers correct NUMBER, TEXT, and YESNO direct assignments, direct `CHECK TYPE` metadata acceptance for TEXT/YESNO fields, negative NUMBER/TEXT/YESNO field `CHECK TYPE` metadata mismatches, NUMBER/TEXT/YESNO wrong-type diagnostics, plus NUMBER/TEXT/YESNO-valued unknown-field diagnostics for direct assignments to undeclared fields
Still needed:
- richer typed function signatures and return values