test: cover compatibility numeric method field assignment

This commit is contained in:
Hermes Agent
2026-09-14 17:54:21 +00:00
parent 34ed60cbe8
commit 45fecc375a
6 changed files with 19 additions and 3 deletions
@@ -208,6 +208,12 @@ class ValidateTypecheckDiagnosticsTests(unittest.TestCase):
MODULE.EXPECTED_OK,
)
def test_includes_compatibility_number_method_field_assignment_success_fixture(self):
self.assertIn(
"tests/typecheck_method_compat_field_assignment_good.claro",
MODULE.EXPECTED_OK,
)
def test_includes_method_field_check_type_fixtures(self):
self.assertIn(
"tests/typecheck_method_field_check_type_bad.claro",
@@ -0,0 +1,9 @@
CLASS Player
HAS score NUMBER
TEACH add TAKES amount
SET score amount + 1
LEARNED
ENDCLASS
NEW Player player
CALL player.add WITH 4