typecheck: diagnose unknown short field annotations

This commit is contained in:
Hermes Agent
2026-09-20 23:11:40 +00:00
parent 6be5088000
commit 9622f99fb1
5 changed files with 12 additions and 3 deletions
+3
View File
@@ -263,6 +263,9 @@ EXPECTED = {
"tests/typecheck_object_field_typed_unknown_type_bad.claro": [
"tests/typecheck_object_field_typed_unknown_type_bad.claro:6: Field player.score needs a known type such as NUMBER, TEXT, or YESNO, but BANANA is not a Claro type. Use NUMBER for score.",
],
"tests/typecheck_object_field_typed_unknown_short_type_bad.claro": [
"tests/typecheck_object_field_typed_unknown_short_type_bad.claro:6: Field player.score needs a known type such as NUMBER, TEXT, or YESNO, but BANANA is not a Claro type. Use NUMBER for score.",
],
"tests/typecheck_object_field_typed_text_bad.claro": [
"tests/typecheck_object_field_typed_text_bad.claro:6: Type mismatch for field player.name: class declares TEXT, but this assignment says NUMBER. Use TEXT for name.",
],