test: cover AS TO method field annotations

This commit is contained in:
Hermes Agent
2026-09-21 03:19:27 +00:00
parent 3eebd6a2b8
commit 878afc8160
7 changed files with 48 additions and 1 deletions
@@ -57,6 +57,16 @@ class ValidateTypecheckDiagnosticsTests(unittest.TestCase):
MODULE.EXPECTED_OK,
)
def test_includes_as_to_method_field_success_fixtures(self):
self.assertIn(
"tests/typecheck_method_inline_field_annotation_as_to_good.claro",
MODULE.EXPECTED_OK,
)
self.assertIn(
"tests/typecheck_method_compat_inline_field_annotation_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,10 @@
CLASS Player
HAS score NUMBER
TEACH set_score TAKES value
SET score AS NUMBER TO 10
LEARNED
END
NEW Player player
CALL player.set_score WITH 10
@@ -0,0 +1,10 @@
CLASS Player
HAS score NUMBER
TEACH set_score
SET score AS NUMBER TO 10
END
END
NEW Player player
DO player.set_score