typecheck: reject extra NEW tokens

This commit is contained in:
Hermes Agent
2026-09-17 00:14:04 +00:00
parent 15d7145ca7
commit eda28f1699
6 changed files with 13 additions and 3 deletions
+1
View File
@@ -61,6 +61,7 @@ Keep declared return types honest: `claro typecheck` now reports friendly diagno
8l. Keep object creation understandable: when classes are declared in a script, an unknown `NEW` class name now gets a direct class-name diagnostic and repair hint; the older permissive `NEW` behavior remains when no class declarations are present.
8m. Keep class field metadata understandable: a missing or unknown type in a `HAS field TYPE` declaration, or extra text after a valid type, now gets a class-and-field diagnostic with supported type examples or a direct repair hint before object-field checks use that metadata.
8n. Keep object creation unambiguous: extra words after `NEW ClassName object` now get a direct repair hint, so a malformed object declaration cannot silently discard part of the learner's input.
### 1. Strong static types