view tangotests/q.d @ 163:a8cd9bc1021a trunk

[svn r179] lots and lots of fixes, much more of tango now compiles/works.
author lindquist
date Mon, 05 May 2008 07:36:29 +0200
parents 0dec7b3727ea
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;
}