pyrefly icon indicating copy to clipboard operation
pyrefly copied to clipboard

Handle self-assignment for walrus operator

Open grievejia opened this issue 10 months ago • 0 comments

Describe the Bug

Minimal repro:

x = 0
(x := x + 1)
reveal_type(x)

Expected: Reveals Literal[1] or int Actual: Reveals Unknown

Sandbox Link

https://pyrefly.org/sandbox/?code=B4AgvCAMBQAUoC4KgNQgIwEpoCcCmAbngIYA2A+gC4CeADnvJkA

(Only applicable for extension issues) IDE Information

No response

grievejia avatar May 18 '25 14:05 grievejia