https://d.puremagic.com/issues/show_bug.cgi?id=12368
Jakob Ovrum <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |[email protected] Resolution| |INVALID --- Comment #2 from Jakob Ovrum <[email protected]> 2014-03-15 02:15:33 PDT --- (In reply to comment #0) > import std.stdio, std.file; > string s, fn; > write(fn, s); > > I think there should be a writeFile alias to avoid this conflict. There's a ton of these in Phobos (another common example is `copy`), and they're not a problem due to how the module system works. Your example is correctly an error. It's up to the user to disambiguate - the user has a ton of options in doing so, including: 1 ---- import std.stdio; static import std.file; string s, fn; write(fn, s); std.file.write(fn, s); ------ 2 ---- import std.stdio; import file = std.file; string s, fn; write(fn, s); file.write(fn, s); ------ 3 ---- import std.stdio : stdoutWrite = write; import std.file : fileWrite = write; string s, fn; stdoutWrite(fn, s); fileWrite(fn, s); ------ 4 ---- import std.stdio; void func() { import std.file; string s, fn; .write(fn, s); write(fn, s); } ----- The list goes on forever. Closing this because this is by design - if you still have a problem with that design, it would need some serious convincing on the NG to warrant any changes. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
