W2002 Safety Warnings

Safety

this variable shadows a variable with the same name in an outer scope

When this occurs

Inner scope variable with same name as outer

Example error message

warning[W2002]: variable 'x' shadows variable in outer scope

How to fix

Rename the inner variable to avoid confusion, or suppress with `#suppress(W2002)`.

Related errors