view test/classinfo4.d @ 112:368547b1cbe6 trunk

[svn r116] Implemented the ClassInfo.destructor field.
author lindquist
date Thu, 22 Nov 2007 22:30:10 +0100
parents a7ae554ce4f4
children
line wrap: on
line source

module classinfo4;

class C
{
}

class D : C
{
    this()
    {
    }
    ~this()
    {
    }
}

template T()
{
    ~this()
    {
    }
}

class E : D
{
    this()
    {
    }
    ~this()
    {
    }
    mixin T;
}

void main()
{
    assert(C.classinfo.defaultConstructor is null);
    assert(C.classinfo.destructor is null);
    assert(D.classinfo.defaultConstructor !is null);
    assert(D.classinfo.destructor !is null);
    assert(E.classinfo.defaultConstructor !is null);
    assert(E.classinfo.destructor !is null);
}