Skip to content

Fix overlap check for variadic generics #18638

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
Feb 9, 2025

Conversation

ilevkivskyi
Copy link
Member

Fixes #18105

When I implemented this initially, I only handled tuples, but forgot instances, thus causing the crash. I don't add many tests, since the instance overlap check simply relays to the tuple one, that is already tested.

(Btw I already forgot how verbose everything is in the TypeVarTuple world :-))

Copy link
Contributor

github-actions bot commented Feb 8, 2025

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

@ilevkivskyi ilevkivskyi merged commit 29ffa3e into python:master Feb 9, 2025
18 checks passed
@ilevkivskyi ilevkivskyi deleted the fix-instance-overlap branch February 9, 2025 09:08
x612skm pushed a commit to x612skm/mypy-dev that referenced this pull request Feb 24, 2025
Fixes python#18105

When I implemented this initially, I only handled tuples, but forgot
instances, thus causing the crash. I don't add many tests, since the
instance overlap check simply relays to the tuple one, that is already
tested.

(Btw I already forgot how verbose everything is in the `TypeVarTuple`
world :-))
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.

Assertion fails in is_overlapping_types() when comparing Unpack TypeVarTuple with default type
2 participants