annotate 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
rev   line source
lindquist@335 1 module tangotests.lazy2;
lindquist@335 2
lindquist@335 3 extern(C) int printf(char*, ...);
lindquist@335 4
lindquist@335 5 void main()
lindquist@335 6 {
lindquist@335 7 lazy1("hello\n");
lindquist@335 8 }
lindquist@335 9
lindquist@335 10 void lazy1(lazy char[] str)
lindquist@335 11 {
lindquist@335 12 lazy2(str);
lindquist@335 13 }
lindquist@335 14
lindquist@335 15 void lazy2(lazy char[] msg)
lindquist@335 16 {
lindquist@335 17 printf("%.*s", msg.length, msg.ptr);
lindquist@335 18 }