test: cover method return addition diagnostics

This commit is contained in:
Hermes Agent
2026-09-12 06:05:10 +00:00
parent a6d93a195a
commit ce28a6eb1c
7 changed files with 27 additions and 4 deletions
+4
View File
@@ -46,6 +46,9 @@ EXPECTED = {
"tests/typecheck_method_return_subtraction_bad.claro": [
"tests/typecheck_method_return_subtraction_bad.claro:6: Type mismatch for return from Player.total: subtraction needs NUMBER values, but \"oops\" looks like TEXT.",
],
"tests/typecheck_method_return_addition_bad.claro": [
"tests/typecheck_method_return_addition_bad.claro:6: Type mismatch for return from Player.total: addition needs NUMBER values, but \"oops\" looks like TEXT.",
],
"tests/typecheck_method_return_division_bad.claro": [
"tests/typecheck_method_return_division_bad.claro:6: Type mismatch for return from Player.total: division needs NUMBER values, but \"oops\" looks like TEXT.",
],
@@ -277,6 +280,7 @@ EXPECTED_OK = [
"tests/typecheck_method_compat_lowercase_return_good.claro",
"tests/typecheck_method_return_expression_good.claro",
"tests/typecheck_method_return_multiplication_good.claro",
"tests/typecheck_method_return_addition_good.claro",
"tests/typecheck_method_unknown_return_expression_good.claro",
"tests/typecheck_method_nested_branch_complete_good.claro",
"tests/typecheck_function_multi_good.claro",