Mercurial > projects > ldc
diff tangotests/lazy1.d @ 329:8c1dc3e705da trunk
[svn r350] Fixed incorrect function types for lazy arguments. looks like lazy arguments have never even worked :o well.. now they should.
author | lindquist |
---|---|
date | Fri, 11 Jul 2008 01:34:04 +0200 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tangotests/lazy1.d Fri Jul 11 01:34:04 2008 +0200 @@ -0,0 +1,13 @@ +module tangotests.lazy1; + +extern(C) int printf(char*, ...); + +void main() +{ + lazystr("whee\n"); +} + +void lazystr(lazy char[] msg) +{ + printf("%.*s", msg.length, msg.ptr); +}