typecheck: clarify arithmetic return mismatches

This commit is contained in:
Hermes Agent
2026-09-11 09:31:48 +00:00
parent 1bc33f98d8
commit dd7efc4648
6 changed files with 13 additions and 5 deletions
+3
View File
@@ -31,6 +31,9 @@ EXPECTED = {
"tests/typecheck_function_return_expression_bad.claro": [
"tests/typecheck_function_return_expression_bad.claro:3: Type mismatch for return from label: expected TEXT, but this value looks like NUMBER.",
],
"tests/typecheck_function_return_arithmetic_bad.claro": [
"tests/typecheck_function_return_arithmetic_bad.claro:3: Type mismatch for return from total: addition needs NUMBER values, but \"oops\" looks like TEXT.",
],
"tests/typecheck_function_unknown_return_expression_bad.claro": [
"tests/typecheck_function_unknown_return_expression_bad.claro:2: Function square's return value could not be understood yet. Use a NUMBER expression after RETURN.",
],