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

Typing spec update for overloads #40

Open
4 of 5 tasks
erictraut opened this issue Jan 25, 2025 · 0 comments
Open
4 of 5 tasks

Typing spec update for overloads #40

erictraut opened this issue Jan 25, 2025 · 0 comments

Comments

@erictraut
Copy link
Collaborator

erictraut commented Jan 25, 2025

I'd like to request that the TC consider adoption of a typing spec update that describes various type checking behaviors related to overloads.

TC Sign-off

  • Carl
  • Eric
  • Jelle
  • Jukka
  • Rebecca

Links to PR & Discussion
The PR can be found here. The latest draft incorporates feedback from PR reviews and the discussion.

The discussion can be found here.

Current Type Checker Behaviors
Carl generously volunteered to write the conformance tests for the change, and they are also included within the PR branch.

Currently, none of the major type checkers fully comply with the spec. Both mypy and pyright are pretty close, but small changes will be required by all type checkers to fully comply.

Controversial Issues
I think we've worked through most of the controversial issues in the discussion phase. One potentially controversial choice is to mandate expansion of know-length tuples, bools, and Enums.

Also, as Carl has pointed out, the current overload evaluation rules depend on non-overload call behaviors that are not currently fully specified. Presumably, we will eventually specify these behaviors as well, and the call evaluation behaviors for overloaded calls will automatically benefit from that additional clarity.

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

No branches or pull requests

1 participant