[ty] fix binary expression inference between boolean literals and bool instances by alpaylan · Pull Request #18663 · astral-sh/ruff (original) (raw)
…e issue that coerces the inferred type to 'int' when the right side is a nominal instance such as a function call
MichaReiser changed the title
fix 'BitwiseAnd' bug at https://github.com/astral-sh/ty/issues/649 [ty] fix 'BitwiseAnd' bug
carljm previously requested changes Jun 13, 2025
… change the inference logic to be more general
…ol' in order to trigger regression properly, change the integer casting logic to cast when the operator is not 'BitOr | BitAnd | BitXor' or when the other operand is an 'IntLiteral'
AlexWaygood changed the title
[ty] fix 'BitwiseAnd' bug [ty] fix binary expression inference between boolean literals and bool instances
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})