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

Fix a crash when function-scope recursive alias appears as upper bound #15159

Merged

Conversation

ilevkivskyi
Copy link
Member

Fixes #15018

The fix is quite straightforward: function-scope aliases are not supported anyway, so we just give up early and let the error appear.

@ilevkivskyi ilevkivskyi requested a review from JukkaL April 30, 2023 20:46
@github-actions
Copy link
Contributor

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

Copy link
Collaborator

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks!

@hauntsaninja hauntsaninja merged commit 3097169 into python:master May 1, 2023
@ilevkivskyi ilevkivskyi deleted the fix-recursive-bound-func-crash branch May 1, 2023 14:05
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.

Internal Error with recursive TypeAlias + TypeVar when in function scope
2 participants