Skip to content

fix(analyser): say what a function takes when no overload fits a call 💬 - #335

Merged
timfennis merged 1 commit into
feat/type-checkerfrom
fix/say-what-a-function-takes
Nov 13, 2026
Merged

timfennis merged 1 commit into
feat/type-checkerfrom
fix/say-what-a-function-takes

Conversation

@timfennis

Copy link
Copy Markdown
Owner

A call that no overload takes only said which arguments it was given. When a function's parameter type comes from something other than its annotations, that left the reader guessing. In let r = []; fn put(x) { r.push(fn() => x); 0 } put(1); put("a");, the first call makes r hold functions returning Ints, so put takes an Int from then on, and put("a") reported only "No function called 'put' found that matches the arguments 'String'".

The error now has help saying what the overloads it could reach take, when there are at most three: "put takes (Int)", or "The overloads of f take (Int), (String)". Larger sets, like the built-in operators, are left out.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-13T16:43:10.198005Z f4307de PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@timfennis
timfennis merged commit 98f60de into feat/type-checker Nov 13, 2026
1 check passed
@timfennis
timfennis deleted the fix/say-what-a-function-takes branch November 13, 2026 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant