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
+3
View File
@@ -28,6 +28,9 @@ EXPECTED = {
"tests/typecheck_duplicate_class_bad.claro": [
"tests/typecheck_duplicate_class_bad.claro:5: Class Player is declared more than once. Give each class a different name.",
],
"tests/typecheck_duplicate_object_bad.claro": [
"tests/typecheck_duplicate_object_bad.claro:6: Object player is created more than once. Give each object a different name.",
],
"tests/typecheck_bad.claro": [
"tests/typecheck_bad.claro:2: Type mismatch for score: it was first set as NUMBER, but this value looks like TEXT.",
"tests/typecheck_bad.claro:3: Type mismatch for name: expected TEXT, but this value looks like NUMBER.",