[Issue 6991] New: Symbol not found when using function-local imports
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Nov 22 19:33:16 PST 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6991
Summary: Symbol not found when using function-local imports
Product: D
Version: D2
Platform: Other
OS/Version: Windows
Status: NEW
Severity: major
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: andrej.mitrovich at gmail.com
--- Comment #0 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2011-11-22 19:32:22 PST ---
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.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list