typecheck: align inline method field annotations

This commit is contained in:
Hermes Agent
2026-09-15 10:34:48 +00:00
parent 9b5e7f3d90
commit 0a31646f5d
8 changed files with 36 additions and 2 deletions
+2
View File
@@ -109,6 +109,8 @@ OBJECT CLASS player AS kind
OBJECT FIELDS player AS fields
```
Inside a method, an inline field type must agree with the class declaration. For example, `HAS score NUMBER` must not be assigned with `SET score TEXT 10`; `claro typecheck` explains the conflict and suggests `NUMBER`.
## Static type safety
Beginners can still write the simplest form: