-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
addressed in next versionIssue is fixed and will appear in next published versionIssue is fixed and will appear in next published versionbugSomething isn't workingSomething isn't working
Description
Describe the bug
Pyright infers wrong literal value from the result of integer division of a positive and negative integer.
Code or Screenshots
reveal_type(-10 // 8) # Literal[-1]
reveal_type(10 // -8) # Literal[-1]>>> -10 // 8
-2
>>> 10 // -8
-2VS Code extension or command-line
VS Code, pylance 2025.3.1 prerelease
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
addressed in next versionIssue is fixed and will appear in next published versionIssue is fixed and will appear in next published versionbugSomething isn't workingSomething isn't working