mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-03-15 08:31:49 +01:00
[svn r121] Finished ModuleInfo implementation.
Static ctors/dtors now work according to spec. Changed class vtable types slightly in some cases. Overridden functions now always take the the type of the first class declaring the method as this parameter. This helps when using headers (w. implementation somewhere else)
This commit is contained in:
17
test/classes10.d
Normal file
17
test/classes10.d
Normal file
@@ -0,0 +1,17 @@
|
||||
module classes10;
|
||||
|
||||
class C
|
||||
{
|
||||
int i;
|
||||
override char[] toString()
|
||||
{
|
||||
return "foobar";
|
||||
}
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
Object o = new C;
|
||||
char[] s = o.toString();
|
||||
assert(s == "foobar");
|
||||
}
|
||||
12
test/moduleinfo2.d
Normal file
12
test/moduleinfo2.d
Normal file
@@ -0,0 +1,12 @@
|
||||
module moduleinfo2;
|
||||
import std.stdio;
|
||||
void main()
|
||||
{
|
||||
ModuleInfo[] mi = ModuleInfo.modules();
|
||||
writefln("listing ",mi.length," modules");
|
||||
foreach(m; mi)
|
||||
{
|
||||
writefln(" ",m.name);
|
||||
}
|
||||
assert(mi.length > 50);
|
||||
}
|
||||
Reference in New Issue
Block a user