https://issues.dlang.org/show_bug.cgi?id=10378
dbr <dbugrepor...@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dbugrepor...@gmail.com --- Comment #3 from dbr <dbugrepor...@gmail.com> --- The fact that local imports hide things instead of properly detecting conflicts is a dangerous bug. I actually almost trashed a bunch of files because of it since I had something like this: import std.stdio; void main() { import std.file; // just wanted to use dirEntries! auto files = dirEntries("importantfiles", "*.{png}", SpanMode.depth); foreach (f; files) { auto hdr = read_header(f.name); writeln(f.name, ":"); writefln("%d x %d", hdr.width, hdr.height); } } Luckily, I had that read_header call *after* the first writeln, and it of course threw and I only lost one file (and it wasn't actually important). I know (now!) that the docs say this about local (or "scoped") imports: "Imported symbols may hide symbols from outer scopes", but this is damn insane. It's inconsistent and surprising. --