Skip to content

Fix explicit types in for loops #2440

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

Merged
merged 1 commit into from
May 20, 2025
Merged

Conversation

swernli
Copy link
Collaborator

@swernli swernli commented May 20, 2025

This fixes a long hidden bug where using explicit types in a for loop (technically supported because the loop binding variable is parsed as a pattern just like bindings for let-stmts and callable params) would cause the type for the binding to be unknown and propagate as an error type through the code.

This fixes a long hidden bug where using explicit types in a for loop (technically supported because the loop binding variable is parsed as a pattern just like bindings for let-stmts and callable params) would cause the type for the binding to be unknown and propagate as an error type through the code.
@swernli swernli requested review from idavis and minestarks as code owners May 20, 2025 20:16
@swernli swernli added this pull request to the merge queue May 20, 2025
Merged via the queue into main with commit 91c296d May 20, 2025
18 checks passed
@swernli swernli deleted the swernli/explicit-types-in-for-loop branch May 20, 2025 21:08
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.

3 participants