scala3
scala3 copied to clipboard
Improve unused check of variable in assignment body
Fixes #24280
In an assign i = f(i), the rhs i is not taken as a read because an enclosing context is an assign to i and the position of the reference is enclosed by the assign tree.