mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-12 02:43:14 +01:00
Fixed some nasty static array-initializer bugs. Fixed bug in DtoArrayLen and DtoArrayPtr for full slices of static arrays.
11 lines
237 B
D
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][]);
|
|
}
|