Effective D book?
Timon Gehr
timon.gehr at gmx.ch
Sun Jun 16 02:34:16 PDT 2013
On 06/16/2013 11:03 AM, Peter Alexander wrote:
> On Saturday, 15 June 2013 at 21:30:50 UTC, Timon Gehr wrote:
>> So does this:
>>
>> void main(){
>> void writeln(string) {}
>> writeln("foo");
>> {
>> import std.stdio;
>> writeln("bar");
>> }
>> }
>
> Still not seeing any issue. The first writeln cannot know about the
> import because it is at a deeper scope, so only the second writeln will
> print anything.
>
...
The local import therefore hides a local symbol.
More information about the Digitalmars-d
mailing list