Files
ldc/test/classinfo1.d
Tomas Lindquist Olsen c99938debf [svn r106] Turns out the last commit wasn't enough, now the D->LLVM process is even more split up.
Basically it tries to do the following in order: Resolve types, Declare symbols, Create constant initializers, Apply initializers, Generate functions bodies.
ClassInfo is now has the most useful(biased?) members working.
Probably other stuf...
2007-11-18 06:52:57 +01:00

29 lines
472 B
D

module classinfo1;
class NoPtrs
{
}
class HasPtrs
{
void* p;
}
void main()
{
{
ClassInfo ci = NoPtrs.classinfo;
char[] name = ci.name;
printf("%.*s\n", name.length, name.ptr);
assert(ci.name == "classinfo1.NoPtrs");
assert(ci.flags == 2);
}
{
ClassInfo ci = HasPtrs.classinfo;
char[] name = ci.name;
printf("%.*s\n", name.length, name.ptr);
assert(ci.name == "classinfo1.HasPtrs");
assert(ci.flags == 0);
}
}