typecheck: reject extra TYPE OF tokens

This commit is contained in:
Hermes Agent
2026-09-18 05:05:35 +00:00
parent 7f0d12ac59
commit 3a9e3d0a8c
6 changed files with 15 additions and 2 deletions
+6
View File
@@ -147,6 +147,12 @@ CHECK TYPE score IS NUMBER
CHECK TYPE needs IS. Try: CHECK TYPE score IS NUMBER.
```
If extra words follow the result name, `claro typecheck` explains that `TYPE OF` accepts one expression, `AS`, and one result name:
```text
TYPE OF score AS kind extra
TYPE OF score has extra text after result name kind. Keep only the expression, AS, and one result name.
```
If the learner leaves out the expression as well, the checker explains all three required parts:
```text