Files
ldc/test/bug51.d
Tomas Lindquist Olsen cb37aab93b [svn r120] ModuleInfo implementation is now almost complete.
Fixed some nasty static array-initializer bugs.
Fixed bug in DtoArrayLen and DtoArrayPtr for full slices of static arrays.
2007-11-25 18:55:52 +01:00

11 lines
237 B
D

module bug51;
const ubyte[3] arr1 = 1;
const ubyte[3] arr2 = [1];
const ubyte[3] arr3 = [1:1];
void main()
{
assert(arr1 == [cast(ubyte)1,1,1][]);
assert(arr2 == [cast(ubyte)1,0,0][]);
assert(arr3 == [cast(ubyte)0,1,0][]);
}