www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - symbol shadowing

reply Ellery Newcomer <ellery-newcomer utulsa.edu> writes:
when is symbol shadowing permitted/forbidden?

It appears that it is only forbidden in multiple levels of statements,
but not in multiple levels of declDefs
Jun 21 2009
parent Jarrett Billingsley <jarrett.billingsley gmail.com> writes:
On Sun, Jun 21, 2009 at 1:31 PM, Ellery
Newcomer<ellery-newcomer utulsa.edu> wrote:
 when is symbol shadowing permitted/forbidden?

 It appears that it is only forbidden in multiple levels of statements,
 but not in multiple levels of declDefs
You've got it. You're not allowed to shadow locals within the same function, basically.
Jun 21 2009