http://d.puremagic.com/issues/show_bug.cgi?id=1509


d...@dawgfoto.de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |d...@dawgfoto.de


--- Comment #4 from d...@dawgfoto.de 2012-02-14 05:17:33 PST ---
Importing into functions, templates and structs do work now.
The cleanest way to fake a namespace is to alias a template.

----
cat > test.d << CODE
template MyNameSpace_()
{
  import std.stdio;

  void foo()
  {
      writeln("MyNameSpace.foo");
  }
}
alias MyNameSpace_!() MyNameSpace;

void main()
{
    MyNameSpace.foo();
}
CODE

dmd -run test.d
----

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to