Mercurial > projects > ldc
annotate tangotests/fail/q.d @ 228:52d1e9d27dc6 trunk
[svn r244] added another asm test.
author | lindquist |
---|---|
date | Sat, 07 Jun 2008 19:20:15 +0200 |
parents | 68a7dd38c03c |
children |
rev | line source |
---|---|
134 | 1 class E : Exception |
2 { | |
3 this(char[] msg) | |
4 { | |
5 super(msg); | |
6 } | |
7 | |
8 char[] toString() | |
9 { | |
10 return super.toString(); | |
11 } | |
12 } | |
13 | |
14 extern(C) int printf(char*, ...); | |
15 | |
16 void main() | |
17 { | |
18 auto e = new E("hello world"); | |
19 auto msg = e.toString(); | |
20 printf("message should be: '%.*s'\n", msg.length, msg.ptr); | |
21 throw e; | |
22 } |