typecheck: diagnose missing TYPE OF AS

This commit is contained in:
Hermes Agent
2026-09-18 03:02:00 +00:00
parent 053aa8aa55
commit 7f0d12ac59
6 changed files with 14 additions and 1 deletions
+6
View File
@@ -159,6 +159,12 @@ If `IS` is present but the expression is missing, Claro points out that the expr
CHECK TYPE needs an expression before IS. Try: CHECK TYPE score IS NUMBER.
```
`TYPE OF` also explains when the result variable is missing its `AS` keyword:
```text
TYPE OF needs AS. Try: TYPE OF score AS kind.
```
If the learner writes `IS` but leaves out the expected type, Claro names the missing piece and shows a complete example:
```text