Identifier resolution, the great implementation defined mess.
Marco Leise via Digitalmars-d
digitalmars-d at puremagic.com
Sun Sep 21 23:44:59 PDT 2014
Am Sun, 21 Sep 2014 23:07:26 -0700
schrieb Walter Bright <newshound2 at digitalmars.com>:
> Your misunderstanding appears to be that:
>
> foo(int a) { int b; }
>
> 'a' and 'b' are in the same scope. They are NOT in the same scope.
But quite understandable that people expect them to be in the
same scope, seeing as there is only one set of {}. Adding some
shadowing warnings should deal with that, so that the earlier
example with `text` being hijacked somehow errors out.
--
Marco
More information about the Digitalmars-d
mailing list