Mercurial > projects > ldc
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tangotests/lazy2.d Sat Jul 12 17:04:36 2008 +0200 @@ -0,0 +1,18 @@ +module tangotests.lazy2; + +extern(C) int printf(char*, ...); + +void main() +{ + lazy1("hello\n"); +} + +void lazy1(lazy char[] str) +{ + lazy2(str); +} + +void lazy2(lazy char[] msg) +{ + printf("%.*s", msg.length, msg.ptr); +}