To avoid confusion, the below is the code that fits the error
message:
import std.bitmanip;
import std.stdio;
import std.array;
import std.range:chain;
void test()
{
int[] a=[1,2,3,4,5];
int[] b=[5,4,3,2,1];
int[] c = chain(a,b).array; // chain two arrays of int
writefln("%s",c);
}
void test2()
{
BitArray a;
a.init([1,0,1,0]);
BitArray b;
b.init([0,1,0,1]);
BitArray[] d;
d~=a;
d~=b;
BitArray[] c=chain(a,b).array; // cannot chain two bitarrays
BitArray[] c=chain([a],[b]).array; // cannot chain two bitarrays
BitArray[] e=chain(d,d).array; // cannot chain two arrays of
bitarrays
writefln("%s",c);
}
int main(string[] args)
{
test();
test2();
return 1;
}