[Issue 830] Access to static member variable causes Access Violation

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jan 11 05:51:02 PST 2007


http://d.puremagic.com/issues/show_bug.cgi?id=830





------- Comment #3 from tomas at famolsen.dk  2007-01-11 07:50 -------
your instance of A is null

This should work:

void main(char[][] args)
{
        class A
        {
                static int v = 1;

                int getv()
                {
                        return v;
                }
        }

        A a = new A;
        assert (a.getv() == 1);
}


-- 



More information about the Digitalmars-d-bugs mailing list