[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
This commit is contained in:
parent
a63cde3827
commit
ce6516fb4c
13 changed files with 757 additions and 164 deletions
32
Examples/test-suite/d/nspace_extend_runme.1.d
Normal file
32
Examples/test-suite/d/nspace_extend_runme.1.d
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
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);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue