This is an enhancement request, but it's borderline being a bug report for the module system. Two similar examples: void main() { int map; import std.algorithm; map!(x => x)([1]); } void main() { int map; import std.algorithm: map; map!(x => x)([1]); } In both cases dmd 2.066alpha gives: test.d(4,8): Error: no property 'map' for type 'int[]' test.d(5,5): Error: template instance map!((x) => x) map is not a template declaration, it is a variable In both programs I expect something like a "'map' identifier shadowing error". An explicit "import std.algorithm: map;" getting totally ignored is not acceptable, in my opinion.
Since 2.071 seems to be The Module System release (finally fixing Issue 313, Issue 314 (hopefully), and Issue 10378), maybe this should be addressed as well?
Either now gives: mapconflict.d(4): Error: template instance `map!((x) => x)` `map` is not a template declaration, it is a variable