test: cover missing method returns

This commit is contained in:
Hermes Agent
2026-09-09 01:43:16 +00:00
parent 0f63ab0c71
commit fe5269e6bc
5 changed files with 13 additions and 2 deletions
+3
View File
@@ -28,6 +28,9 @@ EXPECTED = {
"tests/typecheck_method_return_bad.claro": [
"tests/typecheck_method_return_bad.claro:3: Type mismatch for return from Player.score: expected NUMBER, but this value looks like TEXT.",
],
"tests/typecheck_method_missing_return_bad.claro": [
"tests/typecheck_method_missing_return_bad.claro:4: Method Player.score declares RETURNS NUMBER but has no RETURN statement. Add RETURN with a NUMBER value.",
],
"tests/typecheck_function_multi_bad.claro": [
"tests/typecheck_function_multi_bad.claro:8: Type mismatch for function label: parameter name needs TEXT, but this argument looks like NUMBER.",
"tests/typecheck_function_multi_bad.claro:8: Type mismatch for function label: parameter age needs NUMBER, but this argument looks like TEXT.",