test: cover AS TO object field annotations

This commit is contained in:
Hermes Agent
2026-09-21 01:16:13 +00:00
parent 9622f99fb1
commit 3eebd6a2b8
6 changed files with 24 additions and 1 deletions
@@ -51,6 +51,12 @@ class ValidateTypecheckDiagnosticsTests(unittest.TestCase):
MODULE.EXPECTED_OK,
)
def test_includes_as_to_typed_field_success_fixture(self):
self.assertIn(
"tests/typecheck_object_field_typed_as_to_good.claro",
MODULE.EXPECTED_OK,
)
def test_includes_reverse_text_concatenation_success_fixture(self):
self.assertIn(
"tests/typecheck_object_field_text_concat_reverse_good.claro",
@@ -0,0 +1,7 @@
CLASS Player
HAS score NUMBER
END
NEW Player player
SET player.score AS NUMBER TO 10
CHECK TYPE player.score IS NUMBER