Mercurial > projects > ldc
comparison tangotests/lazy2.d @ 335:17b844102023 trunk
[svn r356] Fixed problem with array length assignment introduced in [355]
author | lindquist |
---|---|
date | Sat, 12 Jul 2008 17:04:36 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
334:20446d22f832 | 335:17b844102023 |
---|---|
1 module tangotests.lazy2; | |
2 | |
3 extern(C) int printf(char*, ...); | |
4 | |
5 void main() | |
6 { | |
7 lazy1("hello\n"); | |
8 } | |
9 | |
10 void lazy1(lazy char[] str) | |
11 { | |
12 lazy2(str); | |
13 } | |
14 | |
15 void lazy2(lazy char[] msg) | |
16 { | |
17 printf("%.*s", msg.length, msg.ptr); | |
18 } |