typecheck: reject duplicate object names

This commit is contained in:
Hermes Agent
2026-09-16 07:38:22 +00:00
parent c713d2b86e
commit bb21a1e3a4
6 changed files with 15 additions and 3 deletions
+2
View File
@@ -56,6 +56,8 @@ Keep declared return types honest: `claro typecheck` now reports friendly diagno
8i. Keep class declarations unambiguous: duplicate `HAS` field names now get a declaration-time diagnostic with a repair hint, preventing conflicting field types from being silently accepted. Broader object declaration validation remains planned.
8j. Keep class names unambiguous: duplicate `CLASS Player` declarations now get a declaration-time diagnostic with a rename hint, preventing two class definitions from competing for one name.
8k. Keep object names unambiguous: repeated `NEW Player player` statements now get a declaration-time diagnostic with a rename hint, preventing one object type environment from silently replacing another.
### 1. Strong static types
Goal: make larger beginner programs safer without making first scripts harder.