Private static inheritance

Kirk McDonald kirklin.mcdonald at gmail.com
Sun Sep 23 18:37:11 PDT 2007


David Ferenczi wrote:
[snip]
> static private import testAA: AA;
> static private import std.cstream: dout;
[snip]

Though this has nothing to do with your question, this is not valid 
code. A selective import cannot also be a static import. When you say:

import std.stdio : writefln;

Then the only symbol which is inserted into the module's namespace is 
'writefln' (and not 'std'). Putting 'static' in front of this import 
causes the compiler to give this error:

test.d(1): static import std cannot have an import bind list

-- 
Kirk McDonald
http://kirkmcdonald.blogspot.com
Pyd: Connecting D and Python
http://pyd.dsource.org


More information about the Digitalmars-d-learn mailing list