test: cover compatibility method subtraction diagnostics

This commit is contained in:
Hermes Agent
2026-09-13 00:36:05 +00:00
parent 747e8156e0
commit 0ee528d9ae
7 changed files with 41 additions and 2 deletions
@@ -128,6 +128,12 @@ class ValidateTypecheckDiagnosticsTests(unittest.TestCase):
MODULE.EXPECTED,
)
def test_includes_compatibility_method_subtraction_return_diagnostic_fixture(self):
self.assertIn(
"tests/typecheck_method_compat_return_subtraction_bad.claro",
MODULE.EXPECTED,
)
def test_includes_lowercase_compatibility_method_return_success_fixture(self):
self.assertIn(
"tests/typecheck_method_compat_lowercase_return_good.claro",
@@ -0,0 +1,6 @@
CLASS Player
TEACH total TAKES amount RETURNS NUMBER
CHECK TYPE amount IS NUMBER
RETURN amount - "oops"
LEARNED
ENDCLASS