Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[red-knot] add call checking #15200

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

[red-knot] add call checking #15200

wants to merge 1 commit into from

Conversation

carljm
Copy link
Contributor

@carljm carljm commented Dec 30, 2024

Summary

This implements checking of calls.

I ended up following Micha's original suggestion from back when the signature representation was first introduced, and flattening it to a single array of parameters. This turned out to be easier to manage, because we can represent parameters using indices into that array, and represent the bound argument types as an array of the same length.

Starred and double-starred arguments are still TODO; these won't be very useful until we have generics.

The handling of diagnostics is just hacked into return_ty_result, which was already inconsistent about whether it emitted diagnostics or not; now it's even more inconsistent. This should probably be addressed somehow before this lands.

The new benchmark errors here surface the need for intersection support in is_assignable_to.

Fixes #14161.

Test Plan

Added mdtests.

@carljm carljm added the red-knot Multi-file analysis & type inference label Dec 30, 2024
Copy link
Contributor

github-actions bot commented Dec 30, 2024

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
red-knot Multi-file analysis & type inference
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[red-knot] check call arguments
1 participant