Skip to content

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

Merged
hauntsaninja merged 2 commits intopython:masterfrom
ilevkivskyi:fix-recursive-bound-func-crash
May 1, 2023
Merged

Fix a crash when function-scope recursive alias appears as upper bound#15159
hauntsaninja merged 2 commits intopython:masterfrom
ilevkivskyi:fix-recursive-bound-func-crash

Conversation

@ilevkivskyi
Copy link
Copy Markdown
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
Copy Markdown
Contributor

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

Copy link
Copy Markdown
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