Mercurial > projects > ldc
view tangotests/fail/q.d @ 176:a074a5ff709c trunk
[svn r192] Fixed: String literals as constant expression was broken for utf16/32.
author | lindquist |
---|---|
date | Wed, 07 May 2008 00:58:36 +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; }