Files
ldc/test/arrays7.d
Tomas Lindquist Olsen 10db08076c [svn r44] Lots of bug fixes.
New array literal support
New array ~= operator support (for single element)
New with statement support
More...
2007-10-19 07:43:21 +02:00

20 lines
275 B
D

module arrays7;
struct S
{
int i;
float f;
long l;
}
void main()
{
S[] arr;
S s;
arr ~= s;
arr ~= S(1,2.64,0xFFFF_FFFF_FFFF);
assert(arr[1].i == 1);
assert(arr[1].f > 2.63 && arr[1].f < 2.65);
assert(arr[1].l == 0xFFFF_FFFF_FFFF);
}