Files
ldc/test/arrays4.d
Tomas Lindquist Olsen c31af3dc2d [svn r191] Fixed: array literals did not support all type/storage combinations.
Fixed: with expression had broke somewhere along the way.
2008-05-07 00:01:13 +02:00

14 lines
209 B
D

module arrays4;
void main()
{
int[] arr;
arr ~= 3;
assert(arr.length == 1);
assert(arr[0] == 3);
arr ~= 5;
assert(arr.length == 2);
assert(arr[0] == 3);
assert(arr[1] == 5);
}