On Tuesday, 13 February 2018 at 13:57:38 UTC, ketmar wrote:
`std.file` has function named `write()` too. and local import completely shadows global imports (i.e. it removes global imports from overload set for the given scope), hence `std.stdio.write()` is not available there.

"..local import completely shadows global imports"

oh... I didn't realised imports are subject to scope rules in that way.

This new knowledge will certainly prevent some ongoing confusion ;-)


Also, if I do this below, how does the compiler choose the correct write function?

import std.stdio;
import std.file;

void main()
    writeln("hello again");

Reply via email to