typecheck: diagnose extra function args

This commit is contained in:
Hermes Agent
2026-09-01 21:36:40 +00:00
parent 8237792cc3
commit d5945bed35
6 changed files with 18 additions and 4 deletions
+3
View File
@@ -26,6 +26,9 @@ EXPECTED = {
"tests/typecheck_function_missing_arg_bad.claro": [
"tests/typecheck_function_missing_arg_bad.claro:6: Function square needs argument amount as NUMBER, but this call does not provide it.",
],
"tests/typecheck_function_extra_arg_bad.claro": [
"tests/typecheck_function_extra_arg_bad.claro:6: Function square only accepts 1 argument, but this call gives 2. Remove the extra argument.",
],
"tests/typecheck_method_bad.claro": [
"tests/typecheck_method_bad.claro:11: Type mismatch for method Player.add: parameter points needs NUMBER, but this argument looks like TEXT.",
],