Mercurial > projects > ldc
comparison tangotests/fail/q.d @ 172:68a7dd38c03c trunk
[svn r188] Fixed using a dereferenced pointer argument as both l- and r-value. fixes tango.io.FileRoots.
Reorganized the tangotests dir a bit.
author | lindquist |
---|---|
date | Tue, 06 May 2008 07:26:27 +0200 |
parents | tangotests/q.d@0dec7b3727ea |
children |
comparison
equal
deleted
inserted
replaced
171:95f07e3f8bb9 | 172:68a7dd38c03c |
---|---|
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 } |