[red-knot] Test: Hashable/Sized => A/B #14769
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Minor change that uses two plain classes
A
andB
instead oftyping.Sized
andtyping.Hashable
.The motivation is twofold: I remember that I was confused when I first saw this test. Was there anything specific to
Sized
andHashable
that was relevant here? (there is, these classes are not overlapping; and you can build a proper intersection from them; but that's true for almost all non-builtin classes).I now ran into another problem while working on #14758:
Sized
andHashable
are protocols that we don't fully understand yet. This causing some trouble when trying to infer whether these are fully-static types or not.