Repository navigation
Make join of callables a bit more principled - #22296
ilevkivskyi wants to merge 3 commits into
Conversation
| def __init__(self, *, x) -> None: ... | ||
| class C2(B): ... | ||
|
|
||
| x = [C1, C2] |
There was a problem hiding this comment.
| x = [C1, C2] | |
| x = [C1, C2] | |
| reveal_type(x) | |
| from typing import TypeVar | |
| T = TypeVar("T") | |
| def join(a: T, b: T) -> T: ... | |
| reveal_type(join(C1, C2)) |
This comment has been minimized.
This comment has been minimized.
|
Btw it looks like this fixes 3 existing issues, updated PR description. The |
This comment has been minimized.
This comment has been minimized.
|
Errors in |
|
Actually something is fishy there, I will dig more deeply. |
|
OK, this uncovered inconsistency in I think I will add a workaround for now with saying that |
|
According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅ |
Fixes #9756
Fixes #10160
Fixes #13182
Fixes #14443
This is needed to de-risk #22286