typecheck: diagnose missing TO in field annotations

This commit is contained in:
Hermes Agent
2026-09-21 15:47:01 +00:00
parent a4f748b142
commit b1eba07cf1
8 changed files with 19 additions and 4 deletions
+3
View File
@@ -266,6 +266,9 @@ EXPECTED = {
"tests/typecheck_object_field_typed_as_to_missing_value_bad.claro": [
"tests/typecheck_object_field_typed_as_to_missing_value_bad.claro:6: SET player.score needs a value after type NUMBER and TO. Add one expression.",
],
"tests/typecheck_object_field_typed_as_missing_to_bad.claro": [
"tests/typecheck_object_field_typed_as_missing_to_bad.claro:6: SET player.score needs TO after type NUMBER. Try: SET player.score AS NUMBER TO 10.",
],
"tests/typecheck_object_field_short_extra_tokens_bad.claro": [
"tests/typecheck_object_field_short_extra_tokens_bad.claro:6: SET player.score has extra text after value 10. Keep only the field name, type, and one expression.",
],