typecheck: reject extra class field tokens

This commit is contained in:
Hermes Agent
2026-09-16 20:05:25 +00:00
parent d9c32ca973
commit 638dd8e763
6 changed files with 13 additions and 5 deletions
+3
View File
@@ -287,6 +287,9 @@ EXPECTED = {
"tests/typecheck_missing_field_type_bad.claro": [
"tests/typecheck_missing_field_type_bad.claro:2: Class Player field score is missing a type. Add a type such as NUMBER, TEXT, YESNO, LIST, or MAP after the field name.",
],
"tests/typecheck_extra_field_tokens_bad.claro": [
"tests/typecheck_extra_field_tokens_bad.claro:2: Class Player field score has extra text after type NUMBER. Keep only the field name and one type.",
],
"tests/typecheck_object_field_unknown_object_bad.claro": [
"tests/typecheck_object_field_unknown_object_bad.claro:5: Object player is not known yet. Create it with NEW ClassName player before setting player.score.",
],