test: cover compatibility unknown field annotations

This commit is contained in:
Hermes Agent
2026-09-15 17:06:45 +00:00
parent 304c43ba45
commit f7452c119c
6 changed files with 20 additions and 0 deletions
+3
View File
@@ -305,6 +305,9 @@ EXPECTED = {
"tests/typecheck_method_inline_field_annotation_unknown_type_bad.claro": [
"tests/typecheck_method_inline_field_annotation_unknown_type_bad.claro:5: Field score in Player.set_score needs a known type such as NUMBER, TEXT, or YESNO, but BANANA is not a Claro type. Use NUMBER for score.",
],
"tests/typecheck_method_compat_inline_field_annotation_unknown_type_bad.claro": [
"tests/typecheck_method_compat_inline_field_annotation_unknown_type_bad.claro:5: Field score in Player.set_score needs a known type such as NUMBER, TEXT, or YESNO, but BANANA is not a Claro type. Use NUMBER for score.",
],
"tests/typecheck_method_unknown_field_expression_bad.claro": [
"tests/typecheck_method_unknown_field_expression_bad.claro:5: Object Player has no field level. Check the field name or add the field to the class with the right type.",
],