Yes. It works anywhere the compiler can Guarantee ...
# language-proposals
g
Yes. It works anywhere the compiler can Guarantee the value hasn't changes between the two lines. Local variables can't change. Nor can vals, but wider scoped vars can...