cat > bug.d << CODE module bug; void func(string) {} template ng() { // renamed selective import isn't a "real" alias import bug : ng = func; } template ok() { import bug : func; // real alias works alias ok = func; } void test() { ok("works"); ng("doesn't work"); } CODE dmd -c bug ---- bug.d(21): Error: template bug.ng cannot deduce function from argument types !()(string), candidates are: bug.d(5): bug.ng()
Selective imports that aren't renamed don't work either. cat > bug.d << CODE template format() { import std.string : format; } void test() { format(""); } CODE dmd -c bug.d
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18920 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB