typecheck: identify methods missing return types

This commit is contained in:
Hermes Agent
2026-09-18 11:16:47 +00:00
parent 131211adef
commit df3c57415d
8 changed files with 29 additions and 2 deletions
@@ -92,6 +92,10 @@ class ValidateTypecheckDiagnosticsTests(unittest.TestCase):
def test_includes_missing_function_return_fixture(self):
self.assertIn("tests/typecheck_function_missing_return_bad.claro", MODULE.EXPECTED)
def test_includes_missing_method_return_type_fixtures(self):
self.assertIn("tests/typecheck_method_missing_return_type_bad.claro", MODULE.EXPECTED)
self.assertIn("tests/typecheck_method_compat_missing_return_type_bad.claro", MODULE.EXPECTED)
def test_includes_branch_missing_function_return_fixture(self):
self.assertIn("tests/typecheck_function_branch_missing_return_bad.claro", MODULE.EXPECTED)
@@ -0,0 +1,5 @@
CLASS Player
TEACH score TAKES amount RETURNS
RETURN amount
LEARNED
END
@@ -0,0 +1,5 @@
CLASS Player
TEACH score RETURNS
RETURN 1
END
END