mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-12 10:53:14 +01:00
Lots of bugfixes. Added support for special foreach on strings. Added std.array, std.utf, std.ctype and std.uni to phobos. Changed all the .c files in the gen dir to .cpp (it *is* C++ after all)
29 lines
341 B
D
29 lines
341 B
D
module bug50;
|
|
|
|
pragma(LLVM_internal, "notypeinfo")
|
|
struct S
|
|
{
|
|
int i;
|
|
float f;
|
|
long l;
|
|
|
|
void print()
|
|
{
|
|
printf("%d %f %lx\n", i, f, l);
|
|
}
|
|
}
|
|
|
|
void main()
|
|
{
|
|
S s;
|
|
s.print();
|
|
s = S(1,2,3);
|
|
s.print();
|
|
|
|
S[] arr;
|
|
{arr ~= s;}
|
|
{arr[0].print();}
|
|
{arr ~= S(1,2,3);}
|
|
{arr[1].print();}
|
|
}
|