-
Notifications
You must be signed in to change notification settings - Fork 219
Labels
runtime semanticsAccurate modeling of how Python's semantics work at runtimeAccurate modeling of how Python's semantics work at runtime
Description
Summary
ty doesn't currently perform "literal math" when using the left and right shift operators:
from typing import reveal_type
reveal_type(2<<2) # int
reveal_type(2>>2) # intThis seems like an inconsistency given the support for other operators. (Pyright has support for both shift operators.)
The Python docs note that "Negative shift counts are illegal and cause a ValueError to be raised".
Version
ty 0.0.1-alpha.7
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
runtime semanticsAccurate modeling of how Python's semantics work at runtimeAccurate modeling of how Python's semantics work at runtime