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
+1
View File
@@ -146,6 +146,7 @@ DO square "oops"
```text
Type mismatch for function square: parameter amount needs NUMBER, but this argument looks like TEXT.
Function square needs argument amount as NUMBER, but this call does not provide it.
Function square only accepts 1 argument, but this call gives 2. Remove the extra argument.
```
For functions with more than one checked parameter, Claro reports each mismatched argument with the parameter name: