Static shadowing checking of Yul.
According to [Yul: Specification of Yul: Scoping Rules], a variable declaration cannot shadow a variable that is visible at the point in which the variable declaration occurs. The notion of `visible' applies not only to variables declared in outer blocks in the same function, but also to variables declared in blocks in outer functions: the former variables are accessible, while the latter are not.
For instance, consider the following Yul code:
function f () { let x function g () { let y // here } }
At the point marked as `here',
The non-shadowing of outer variables in the same function
(e.g. the non-shadowing of
The non-shadowing of outer variables in different functions
(e.g. the non-shadowing of
The shadowing restrictions formalized here only apply to variables, not to functions. Variables and functions are subject to different visibility and accessibility rules; all the rules that apply to functions are parts of the safety checks.