annotate tests/mini/bug32.d @ 341:1bb99290e03a trunk

[svn r362] Started merging the old 'test' dir as well as the newer 'tangotests' dir into 'tests/mini' and 'tests/minicomplex'.
author lindquist
date Sun, 13 Jul 2008 02:51:19 +0200
parents test/bug32.d@d9d5d59873d8
children
rev   line source
lindquist@54 1 module bug32;
lindquist@270 2 extern(C) int printf(char*, ...);
lindquist@54 3
lindquist@54 4 struct S
lindquist@54 5 {
lindquist@54 6 char[] getName() { return name; }
lindquist@54 7 char[] name;
lindquist@54 8 }
lindquist@54 9
lindquist@54 10 void main()
lindquist@54 11 {
lindquist@54 12 S s = S("Kyle");
lindquist@54 13 char[] name = s.name;
lindquist@54 14 printf("%.*s\n", name.length, name.ptr);
lindquist@54 15 }