view tangotests/fail/q.d @ 286:a3b7c19c866c trunk

[svn r307] Fixed: multidimensional new expressions now work. Eg.: auto ma = new int[][] (3,9);
author lindquist
date Sat, 21 Jun 2008 04:47:14 +0200
parents 68a7dd38c03c
children
line wrap: on
line source

class E : Exception
{
    this(char[] msg)
    {
        super(msg);
    }

    char[] toString()
    {
        return super.toString();
    }
}

extern(C) int printf(char*, ...);

void main()
{
    auto e = new E("hello world");
    auto msg = e.toString();
    printf("message should be: '%.*s'\n", msg.length, msg.ptr);
    throw e;
}