ruff
57ba25ca - [red-knot] Type inference for comparisons involving intersection types (#14138)

Commit
1 year ago
[red-knot] Type inference for comparisons involving intersection types (#14138) ## Summary This adds type inference for comparison expressions involving intersection types. For example: ```py x = get_random_int() if x != 42: reveal_type(x == 42) # revealed: Literal[False] reveal_type(x == 43) # bool ``` closes #13854 ## Test Plan New Markdown-based tests. --------- Co-authored-by: Carl Meyer <carl@astral.sh>
Author
Parents
Loading