W2002 Warnings

shadowed-variable

variable shadows 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