Skip to content

More precise inferred type for literal ints #252

@grievejia

Description

@grievejia

Describe the Bug

Minimal repro:

reveal_type(1 + 2)

Expected: reveals Literal[3]
Actual: reveals int

Sandbox Link

https://pyrefly.org/sandbox/?code=GYJw9gtgBALgngBwJYDsDmUkQWEMogCmAboQIYA2A+vAoQFBGmU2KEAUAjFANRQBMASiA

(Only applicable for extension issues) IDE Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedLarger than "good first issue", but still well-defined and ready for someone to pick up

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions