test: cover compatibility function return types

This commit is contained in:
Hermes Agent
2026-09-09 14:05:35 +00:00
parent e26a398082
commit 762fde4379
8 changed files with 26 additions and 3 deletions
+4
View File
@@ -22,6 +22,9 @@ EXPECTED = {
"tests/typecheck_function_return_bad.claro": [
"tests/typecheck_function_return_bad.claro:3: Type mismatch for return from square: expected NUMBER, but this value looks like TEXT.",
],
"tests/typecheck_function_compat_return_bad.claro": [
"tests/typecheck_function_compat_return_bad.claro:3: Type mismatch for return from square: expected NUMBER, but this value looks like TEXT.",
],
"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.",
],
@@ -205,6 +208,7 @@ EXPECTED = {
EXPECTED_OK = [
"tests/typecheck_function_good.claro",
"tests/typecheck_function_return_good.claro",
"tests/typecheck_function_compat_return_good.claro",
"tests/typecheck_function_return_expression_good.claro",
"tests/typecheck_method_return_good.claro",
"tests/typecheck_method_return_expression_good.claro",