This compiles correctly (DMD 2.054 beta): import std.string: join; void main() { string[] a = ["foo", "bar"]; string s = join(a); } This too: void main() { import std.string; string[] a = ["foo", "bar"]; string s = join(a); } But this: void main() { import std.string: join; string[] a = ["foo", "bar"]; string s = join(a); } gives: temp.d(4): Error: undefined identifier join, did you mean function main?
*** Issue 6465 has been marked as a duplicate of this issue. ***
*** Issue 6991 has been marked as a duplicate of this issue. ***
https://github.com/D-Programming-Language/dmd/pull/190 fixes this as well.
This seems a related problem: void main() { import std.algorithm; auto data = new int[10]; sort(data); // OK data.sort(); // Error: undefined identifier module temp.sort }
https://github.com/D-Programming-Language/dmd/commit/ff9fa25f3f7f3091787f7459e1950add6cff50b2