import std.stdio; // import std.cpuid : threadsPerCPU; // ok void main() { import std.cpuid : threadsPerCPU; writeln(threadsPerCPU); // NG, undefined identifier threadsPerCPU } It doesn't complain about the import, but only when used in a function call, and only if it's imported within the function.
See bug 6272
*** This issue has been marked as a duplicate of issue 6272 ***