Skip to content

Conversation

@omelancon
Copy link
Owner

@omelancon omelancon commented Oct 27, 2023

The arithmetic semantics is missing a check when the rhs operand is of the same type or of a supertype of the lhs operand. This was pointed by Guido Van Rossum here: faster-cpython/ideas#626

This PR adds the missing checks. It required minimal updates to the partial evaluator, mainly to remove some dead code that was generated in the behaviors.

The behaviors were regenerated from the fixed semantics. Notice that they are identical to the previous ones.

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.

2 participants