test: add object field positive typecheck fixture

This commit is contained in:
Hermes Agent
2026-06-16 03:06:10 -06:00
parent 2636d2ab8c
commit 23d65d21f3
7 changed files with 17 additions and 3 deletions
+2
View File
@@ -150,6 +150,8 @@ Output:
Type mismatch for field player.score: expected NUMBER, but this value looks like TEXT.
```
Both sides of this narrow field foundation are covered by validation: `tests/typecheck_object_field_good.claro` checks that `SET player.score 10` is accepted for a `HAS score NUMBER` field, and `tests/typecheck_object_field_bad.claro` checks the friendly wrong-type diagnostic.
This slice is intentionally small: it covers direct `NEW Class object` plus `SET object.field value` cases in one file. Broader object flows, aliases, method return checks, and richer object signatures remain future work.
## Status