swig/Examples/test-suite/d/nspace_extend_runme.2.d
David Nadlinger ce6516fb4c [D] nspace support.
As for C# and Java, this doesn't work for free functions/variables yet.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12534 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-03-13 00:32:26 +00:00

32 lines
838 B
D

module nspace_extend_runme;
static import oi1c = nspace_extend.Outer.Inner1.Color;
static import oi2c = nspace_extend.Outer.Inner2.Color;
void main() {
{
// constructors and destructors
scope color1 = new oi1c.Color();
scope color = new oi1c.Color(color1);
// class methods
color.colorInstanceMethod(20.0);
oi1c.Color.colorStaticMethod(20.0);
auto created = oi1c.Color.create();
}
{
// constructors and destructors
scope color2 = new oi2c.Color();
scope color = new oi2c.Color(color2);
// class methods
color.colorInstanceMethod(20.0);
oi2c.Color.colorStaticMethod(20.0);
auto created = oi2c.Color.create();
// Same class different namespaces
auto col1 = new oi1c.Color();
auto col2 = oi2c.Color.create();
col2.colors(col1, col1, col2, col2, col2);
}
}