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
+3
View File
@@ -305,6 +305,9 @@ EXPECTED = {
"tests/typecheck_missing_type_of_as_bad.claro": [
"tests/typecheck_missing_type_of_as_bad.claro:2: TYPE OF needs AS. Try: TYPE OF score AS kind.",
],
"tests/typecheck_extra_type_of_tokens_bad.claro": [
"tests/typecheck_extra_type_of_tokens_bad.claro:2: TYPE OF score has extra text after result name kind. Keep only the expression, AS, and one result name.",
],
"tests/typecheck_extra_check_type_tokens_bad.claro": [
"tests/typecheck_extra_check_type_tokens_bad.claro:2: CHECK TYPE score has extra text after type NUMBER. Keep only the expression, IS, and one type.",
],