view test/classes7.d @ 12:ee302fe07296 trunk

[svn r16] * Updated all tests to have a main * Updated runalltests to both compile and run the tests
author lindquist
date Tue, 02 Oct 2007 05:27:44 +0200
parents d3ee9efe20e2
children
line wrap: on
line source

module classes7;

class C
{
    int i=0;
    void f()
    {
        i=42;
    }
    void g()
    {
        f();
    }
}

void main()
{
    scope c = new C;
    c.g();
    assert(c.i == 42);
}