mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-07-06 15:34:10 +02:00
[svn r362] Started merging the old 'test' dir as well as the newer 'tangotests' dir into 'tests/mini' and 'tests/minicomplex'.
This commit is contained in:
15
tests/mini/bug32.d
Normal file
15
tests/mini/bug32.d
Normal file
@@ -0,0 +1,15 @@
|
||||
module bug32;
|
||||
extern(C) int printf(char*, ...);
|
||||
|
||||
struct S
|
||||
{
|
||||
char[] getName() { return name; }
|
||||
char[] name;
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
S s = S("Kyle");
|
||||
char[] name = s.name;
|
||||
printf("%.*s\n", name.length, name.ptr);
|
||||
}
|
||||
Reference in New Issue
Block a user